#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?>(?:(?:^|,|\r?\n)\s*)(?:"[^"\\]*(?:\\[\S\s][^"\\]*)*"(?:\s*(?:(?=,|\r?\n)|$))|[^,]*(?:\s*(?:(?=,)|$))))*?(?>(?:^|,|\r?\n)\s*)\K"([^"\\]*?(?:\\[\S\s][^"\\]*?)*,[^"\\]*(?:\\[\S\s][^"\\]*)*)""
Local $sString = "243,"p s","","","","Smith, Ph.D.","11872","Canada","",29,,,"","","","","","","UT","",,"","Bic. Gaspe",,,,"Dry cliffs",,"","","","","47633","","","","",1938,7,126839" & @CRLF & _
"" & @CRLF & _
"ID,NAME,TITLE,DESCRIPTION,," & @CRLF & _
"PRO1234,"JOHN SMITH",ENGINEER,"JOHN HAS BEEN WORKING" & @CRLF & _
"" & @CRLF & _
"HARD ON BEING A GOOD" & @CRLF & _
"" & @CRLF & _
"SERVENT."" & @CRLF & _
"PRO1235,"KEITH SMITH",ENGINEER,"keith, has been working" & @CRLF & _
"" & @CRLF & _
"hard on being a good" & @CRLF & _
"" & @CRLF & _
"servent."" & @CRLF & _
"PRO1235,"KENNY SMITH",,"keith has been working" & @CRLF & _
"" & @CRLF & _
"hard on being a good" & @CRLF & _
"" & @CRLF & _
"servent."" & @CRLF & _
"PRO1235,"RICK SMITH",,,"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
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