#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "\.(fa-(?:\w+(?:-)?)+):before\s+{\s*content:\s*"(.+)";\s+}"
Local $sString = ".fa-glass:before {" & @CRLF & _
" content: "\f000";" & @CRLF & _
"}" & @CRLF & _
".fa-music:before {" & @CRLF & _
" content: "\f001";" & @CRLF & _
"}" & @CRLF & _
".fa-search:before {" & @CRLF & _
" content: "\f002";" & @CRLF & _
"}" & @CRLF & _
".fa-envelope-o:before {" & @CRLF & _
" content: "\f003";" & @CRLF & _
"}" & @CRLF & _
".fa-heart:before {" & @CRLF & _
" content: "\f004";" & @CRLF & _
"}" & @CRLF & _
".fa-star:before {" & @CRLF & _
" content: "\f005";" & @CRLF & _
"}" & @CRLF & _
".fa-star-o:before {" & @CRLF & _
" content: "\f006";" & @CRLF & _
"}" & @CRLF & _
".fa-user:before {" & @CRLF & _
" content: "\f007";" & @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