#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(-|\*|[0-9]+.) \[ \]"
Local $sString = "- [ ]" & @CRLF & _
"-[] " & @CRLF & _
"- []" & @CRLF & _
"-[x]" & @CRLF & _
"- [X] " & @CRLF & _
"1. [ ]" & @CRLF & _
"2. [x]" & @CRLF & _
"11. [] " & @CRLF & _
"2125. [ ] " & @CRLF & _
". [ ] // Fixed with + instead of *" & @CRLF & _
"" & @CRLF & _
"1. [ ] #TODO #experiments **Zephyr** Use external Groove:" & @CRLF & _
" 1. [ ] Board LED turning on." & @CRLF & _
" 2. [ ] Buzzer making sound." & @CRLF & _
" 3. [ ] Neo Pixel LED turning on with rainbow pattern." & @CRLF & _
" 4. [ ] Neo Pixel LED switching on/off state." & @CRLF & _
" 5. [ ] Neo Pixel LED switching different patterns." & @CRLF & _
" 6. [ ] OLED screen showing some text." & @CRLF & _
" 7. [ ] OLED screen showing some images." & @CRLF & _
" 8. [ ] Combination of 2" & @CRLF & _
" 9. [ ] Combination of all!"
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