#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?i)(f(.*)?(\s)?o(.*)?(\s)?r(.*)?(\s)?t(.*)?(\s)?n(.*)?(\s)?i(.*)?(\s)?t(.*)?(\s)?e)"
Local $sString = "fbjrehfdlkjsfortnitesfdsojfoidsjkclnvklnFortnitebjbsvhfsdulfd" & @CRLF & _
"" & @CRLF & _
"F O R T N I T E" & @CRLF & _
"" & @CRLF & _
"Fgfdg" & @CRLF & _
"Ofdsgfdsg" & @CRLF & _
"Rfsdgfdsgf" & @CRLF & _
"Tdsgfsdgf" & @CRLF & _
"Nsdgfsdgf" & @CRLF & _
"Idsgfsdgfds" & @CRLF & _
"Tfsdgfdgf" & @CRLF & _
"Esgfsgfsd" & @CRLF & _
"" & @CRLF & _
"FOOOOOORRRRRRTTTTTNNNNIIIIITTTTTTEEEEEE" & @CRLF & _
"" & @CRLF & _
"F.O.R.T.N.I.T.E" & @CRLF & _
"" & @CRLF & _
"// In the original string before the regex check, leet speak numbers can be replaced with letters." & @CRLF & _
"f0rtn1t3" & @CRLF & _
"// After writing the "comment" above, I found that it matched "Fornite" in it and realized the monster I had created." & @CRLF & _
"// Please help me."
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