#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "the"
Local $sString = "Text starts with (Regex Expression /)" & @CRLF & _
"" & @CRLF & _
"This test is to help with the Regex when the symbol is / and looks for any text where the text is contained" & @CRLF & _
"" & @CRLF & _
"Change the box above to have the word the and it will match all the thes in the text, this is case sensitive." & @CRLF & _
"-------------" & @CRLF & _
"Text starts with (Regex Expression ^)" & @CRLF & _
"" & @CRLF & _
"This test is to help with the Regex when the symbol is ^ and looks for text which starts with ^" & @CRLF & _
"" & @CRLF & _
"Change the box above to have the word ^Text and it will match the first example." & @CRLF & _
"-------------" & @CRLF & _
"Text ends with (Regex Expression $)" & @CRLF & _
"" & @CRLF & _
"This test is to help with the Regex when the symbol is $ and looks for text which ends with xxxxx$" & @CRLF & _
"" & @CRLF & _
"Change the box above to have the word example$ and make sure that you are looking at the multi-line add this in the text field at the top near the g (will not be relevant for URL) and it will match the last example" & @CRLF & _
"" & @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