#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?ix)<\s*meta\s" & @CRLF & _
"" & @CRLF & _
"# using lookahead to capture type to $1" & @CRLF & _
"(?=[^>]*?" & @CRLF & _
" \b(?:name|property|http-equiv)\s*=\s*" & @CRLF & _
" (?|"\s*([^"]*?)\s*"|'\s*([^']*?)\s*'|" & @CRLF & _
" ([^"'>]*?)(?=\s*/?\s*>|\s\w+\s*=))" & @CRLF & _
")" & @CRLF & _
"" & @CRLF & _
"# capture the content to $2" & @CRLF & _
"[^>]*?\bcontent\s*=\s*" & @CRLF & _
" (?|"\s*([^"]*?)\s*"|'\s*([^']*?)\s*'|" & @CRLF & _
" ([^"'>]*?)(?=\s*/?\s*>|\s\w+\s*=))" & @CRLF & _
"[^>]*>" & @CRLF & _
""
Local $sString = "<meta content = foo name = bar />" & @CRLF & _
"<meta name= bar sdf content= foo >" & @CRLF & _
"<meta content="name" name="author">" & @CRLF & _
"<meta name ="keywords" content = " php documentation ">" & @CRLF & _
"<meta name= "DESCRIPTION" content=" a php manual ">" & @CRLF & _
"<meta name="geo.position" content="49.33;-86.59 ">" & @CRLF & _
"<meta content=' 49.33;-86.59' name = geo.position >"
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