#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "[^]]*]$"
Local $sString = "[find the l/ast dot . in this . ridden text . . . []re/ally]/]" & @CRLF & _
"asjdakjsgdakjsgdajsgdajsgdjkagdajksgdk]ajsgd/" & @CRLF & _
"sdjkhasda8dy98asyd98adhahda8shd98h28h98]2h98h429h8329h8398hrwrh8ewer/" & @CRLF & _
"ALKSJlkajsLKASJ[IMG:232442323.JPG@SOMEDOMAIN.COM]itdoesntmattter" & @CRLF & _
"whatorhowitritethisstring]" & @CRLF & _
"* the fat cat in the purple hat " & @CRLF & _
"* needs to go on a diet or it will break the machine" & @CRLF & _
"*** which will absolutely cause some insurance cost increases]]" & @CRLF & _
""
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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