#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?iu)create\s+table\s*`\w*`\s*\(\n\s*`([\w\-_]*)`\s*([\w]*).*(auto_increment)([\n\s\w()',`]*)(primary key)\s*\(`([\w\-_]*)`\).*\n.*engine\s*=\s*(InnoDB).*charset\s*=\s*([\w\-]*);"
Local $sString = "CREATE TABLE `column_statiskey_map` (" & @CRLF & _
" `ID` int(11) NOT NULL AUTO_INCREMENT," & @CRLF & _
" `Platform` varchar(255) NOT NULL," & @CRLF & _
" `ColumnName` varchar(255) NOT NULL DEFAULT ''," & @CRLF & _
" `Statiskey` varchar(255) NOT NULL DEFAULT ''," & @CRLF & _
" `Status` int(11) NOT NULL DEFAULT '0'," & @CRLF & _
" PRIMARY KEY (`ID`)" & @CRLF & _
") ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;"
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