#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(^([^|\r\n]*\|){0,8}[^|\r\n]*$)|(^([^|\r\n]*\|){10,1000}[^|\r\n]*$)"
Local $sString = "Susan|Ward |1 |1 |1 |1 |0 |||3250905 " & @CRLF & _
"Allen|Doe|4 |1 |1 |1 |0 ||" & @CRLF & _
"some text" & @CRLF & _
"text" & @CRLF & _
"more text in the same column|3250061 " & @CRLF & _
"Mary|James|4 |1 |1 |1 |0 |||3250061 Albert|Nordling|1 |1 |1 |0 |0 |||900434 " & @CRLF & _
"Henry|Johnson|1 |1 |1 |0 |0 |||900434 " & @CRLF & _
"Tony|Anderson |1 |1 |1 |1 |0 |||3250905 "
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