#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^{.} ?(?:(?:\[ ?(.+?) ?\]|\< ?(.+?) ?\>) ?)"
Local $sString = "{c}" & @CRLF & _
"{c} [ plugin/theme ID ]" & @CRLF & _
"{c} [ plugin URL ]" & @CRLF & _
"{c}" & @CRLF & _
"{c} [ plugin/theme ID ]" & @CRLF & _
"{c}" & @CRLF & _
"{c} [ plugin/theme ID ]" & @CRLF & _
"{c} [ ...arguments ]" & @CRLF & _
"{c} [ commandName ]" & @CRLF & _
"{c} [ ...arguments ]" & @CRLF & _
"{c} [text to make worse]" & @CRLF & _
"{c} any text here" & @CRLF & _
"{c} <disable|enable|remove> <id>" & @CRLF & _
"{c} [house name]" & @CRLF & _
"{c} [type]" & @CRLF & _
"{c}" & @CRLF & _
"{c} <view|list|add|update|delete> <tagName> [tagContent]" & @CRLF & _
"{c} [message id] [channel id]" & @CRLF & _
"{c} <id>" & @CRLF & _
"{c} [--send] [TEXT | FILE_URL | --clipboard]" & @CRLF & _
"{c} [--send] [TEXT | FILE_URL | --clipboard]"
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