#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?<type>\w*)\/(?<tree>([\w\-]+\.)+)?(?<subtype>[\w\-]+)(\+(?<suffix>[\w\-\.]+))?(; (?<parameter>[\w+-\.=]+))?"
Local $sString = "text/html; charset=UTF-8" & @CRLF & _
"application/x-executable" & @CRLF & _
"application/graphql" & @CRLF & _
"application/javascript" & @CRLF & _
"application/json" & @CRLF & _
"application/ld+json" & @CRLF & _
"application/msword" & @CRLF & _
"application/pdf" & @CRLF & _
"application/sql" & @CRLF & _
"application/vnd.api+json" & @CRLF & _
"application/vnd.ms-excel" & @CRLF & _
"application/vnd.ms-powerpoint" & @CRLF & _
"application/vnd.oasis.opendocument.text" & @CRLF & _
"application/vnd.openxmlformats-officedocument.presentationml.presentation" & @CRLF & _
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" & @CRLF & _
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" & @CRLF & _
"application/x-www-form-urlencoded" & @CRLF & _
"application/xml" & @CRLF & _
"application/zip" & @CRLF & _
"application/zstd" & @CRLF & _
"audio/mpeg" & @CRLF & _
"audio/ogg" & @CRLF & _
"image/gif" & @CRLF & _
"image/apng" & @CRLF & _
"image/flif" & @CRLF & _
"image/webp" & @CRLF & _
"image/x-mng" & @CRLF & _
"image/jpeg" & @CRLF & _
"image/png" & @CRLF & _
"multipart/form-data" & @CRLF & _
"text/css" & @CRLF & _
"text/csv" & @CRLF & _
"text/html" & @CRLF & _
"text/php" & @CRLF & _
"text/plain" & @CRLF & _
"text/xml"
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