#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "\#.*?(?=\s|\n|\#|$)"
Local $sString = "#3!x_j@`(/l3W#qfSnl#6R7x1b,jBb0p#Oq/:o#!tH3AITK^Yyp#B," & @CRLF & _
"#qwe#%#T &#v#v#N###O###2#` `S}^&9 #M # Aa23%2##p#?#w#a" & @CRLF & _
"#123#9#Z a%h#&#C###;###? a#u#g#Q#r#8# #a#A#l#p#r#b#}#c" & @CRLF & _
"#R#M#(#p###K###l###1###b 2#D\'>.w/Y_2 sha2&2{] #4x$D~kR" & @CRLF & _
"#lbTb1k3# #Dlo ## #j# #W H#tjsR.Lzkc #B*xt&nFty?il#jp" & @CRLF & _
"#>p8BTU2###PW!aB###z###-VM (s82hdk#T 8sUJWfuy2#-#f~fh)" & @CRLF & _
"#d{jyi|^ofYD#q)!#special~!@$%^&*()#_+`-=[];\',./?><\":}{"
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