#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(b|t)[ea]r"
Local $sString = "abc, easy as 123" & @CRLF & _
"abcdef, easy as 123456!!" & @CRLF & _
"When it is breezy, I wear my green fleece!" & @CRLF & _
"That Cat wearing the Fat Hat is about 123 years old!" & @CRLF & _
"Python in morse code is .--. -.-- - .... --- -." & @CRLF & _
"Like watching bluebirds, blackbirds, and redbirds!" & @CRLF & _
"THE PRANCING PONY is located in Bree." & @CRLF & _
"Today is October, 2, 2020. We started class at 8:00a." & @CRLF & _
"Random: ljsd98s9fhekSDKF7seiwe7" & @CRLF & _
"" & @CRLF & _
"In a hole in the ground there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort." & @CRLF & _
"" & @CRLF & _
""
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