#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(?<!^)[ \t]*\r?\n(?=\$)"
Local $sString = "$index 57320 " & @CRLF & _
"$title The vertex-cover polynomial of a graph " & @CRLF & _
"$time 1988 " & @CRLF & _
"$abstract In this paper we define the vertex-cover... " & @CRLF & _
"" & @CRLF & _
"$index 57321 " & @CRLF & _
"$title Locating stations on rapid transit lines " & @CRLF & _
"$time 1978 " & @CRLF & _
"" & @CRLF & _
"$index 57322 " & @CRLF & _
"$title Fast heuristics for large scale covering-location problems " & @CRLF & _
"$time 1998 " & @CRLF & _
"$abstract We propose fast heuristics for large scale... " & @CRLF & _
"" & @CRLF & _
"$index 57323 " & @CRLF & _
"$title Efficient vector processing on dataflow supercomputer SIGMA-1 " & @CRLF & _
"$time 2001 " & @CRLF & _
"$abstract Efficiency in vector handling is the key to obtaining high... "
Local $sSubst = ","
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm