#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?ms)CREATE TABLE \x60(\w*)\x60 \(\n(.*?)^\) (.*?);"
Local $sString = "# ------------------------------------------------------------" & @CRLF & _
"" & @CRLF & _
"CREATE TABLE `bkash_agent_incentive_status` (" & @CRLF & _
" `wallet_number` varchar(15) NOT NULL," & @CRLF & _
" `created_by` bigint(20) DEFAULT NULL," & @CRLF & _
" `updated_by` bigint(20) DEFAULT NULL," & @CRLF & _
" `deleted_by` bigint(20) DEFAULT NULL," & @CRLF & _
" `status` int(11) NOT NULL," & @CRLF & _
" `comment` longtext," & @CRLF & _
" `createdAt` datetime DEFAULT NULL," & @CRLF & _
" `updatedAt` datetime DEFAULT NULL," & @CRLF & _
" PRIMARY KEY (`wallet_number`)" & @CRLF & _
") ENGINE=InnoDB DEFAULT CHARSET=utf8;" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"# Dump of table bkash_barcodes" & @CRLF & _
"# ------------------------------------------------------------" & @CRLF & _
"" & @CRLF & _
"CREATE TABLE `bkash_barcodes` (" & @CRLF & _
" `barcode_number` varchar(25) NOT NULL," & @CRLF & _
" `created_by` bigint(20) DEFAULT NULL," & @CRLF & _
" `updated_by` bigint(20) DEFAULT NULL," & @CRLF & _
" `deleted_by` bigint(20) DEFAULT NULL," & @CRLF & _
" `registered` tinyint(1) DEFAULT NULL," & @CRLF & _
" `createdAt` datetime DEFAULT NULL," & @CRLF & _
" `updatedAt` datetime DEFAULT NULL," & @CRLF & _
" `created_email` varchar(50) DEFAULT NULL," & @CRLF & _
" PRIMARY KEY (`barcode_number`)" & @CRLF & _
") ENGINE=InnoDB DEFAULT CHARSET=utf8;" & @CRLF & _
"" & @CRLF & _
""
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