#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?x)^(" & @CRLF & _
" ( # regular executable builds" & @CRLF & _
" (?!lib)([^_]+)_build_(windows|linux|osx|android|illumos)_(x86_64|x86|arm|arm64)_(release|debug)" & @CRLF & _
" )" & @CRLF & _
" |" & @CRLF & _
" ( # library builds" & @CRLF & _
" lib([^_]+)_build_(windows|linux|osx|android|illumos)_(x86_64|x86|arm|arm64)_(shared|static|mixed)_(release|debug)" & @CRLF & _
" )" & @CRLF & _
" |" & @CRLF & _
" ( # syncing source code of a project from git or something else" & @CRLF & _
" ([^_]+)_src" & @CRLF & _
" )" & @CRLF & _
" |" & @CRLF & _
" ( # static code analizer" & @CRLF & _
" ([^_]+)_analyze_(cppcheck|scan-build)" & @CRLF & _
" )" & @CRLF & _
" |" & @CRLF & _
" ( # package builds" & @CRLF & _
" ([^_]+)_pkg_(windows|linux|osx|android|illumos)_(x86_64|x86|arm|arm64)_(stable|testing|nightly|unstable)" & @CRLF & _
" )" & @CRLF & _
")$"
Local $sString = "libtoxcore_build_windows_x86_shared_release"
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