#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "\$\(\"#.*\"\)\.click|\.load\(\".*\"\);"
Local $sString = "$(document).ready(function(){" & @CRLF & _
"" & @CRLF & _
" $("#travel").click(function(){ " & @CRLF & _
" $("#contentpromolain2").load("ajax.promolainnya.php?product=0&subcat=1");" & @CRLF & _
" });" & @CRLF & _
"" & @CRLF & _
" $("#lifestyle").click(function(){ " & @CRLF & _
" $("#contentpromolain2").load("ajax.promolainnya.php?product=0&subcat=2");" & @CRLF & _
" });" & @CRLF & _
"" & @CRLF & _
" $("#fnb").click(function(){ " & @CRLF & _
" $("#contentpromolain2").load("ajax.promolainnya.php?product=0&subcat=3");" & @CRLF & _
" });" & @CRLF & _
"" & @CRLF & _
" $("#gadget_entertainment").click(function(){ " & @CRLF & _
" $("#contentpromolain2").load("ajax.promolainnya.php?product=0&subcat=4");" & @CRLF & _
" });" & @CRLF & _
"" & @CRLF & _
" $("#dailyneeds").click(function(){ " & @CRLF & _
" $("#contentpromolain2").load("ajax.promolainnya.php?product=0&subcat=5");" & @CRLF & _
" });" & @CRLF & _
"" & @CRLF & _
" $("#others_promo").click(function(){ " & @CRLF & _
" $("#contentpromolain2").load("ajax.promolainnya.php?product=0&subcat=6");" & @CRLF & _
" });" & @CRLF & _
"" & @CRLF & _
" $("#kartukredit").click(function(){ " & @CRLF & _
" $("#contentpromolain2").load("ajax.promolainnya.php?product=1");" & @CRLF & _
" });" & @CRLF & _
"" & @CRLF & _
" $("#simpanan").click(function(){ " & @CRLF & _
" $("#contentpromolain2").load("ajax.promolainnya.php?product=2");" & @CRLF & _
" });" & @CRLF & _
"" & @CRLF & _
" $("#others").click(function(){ " & @CRLF & _
" $("#contentpromolain2").load("ajax.promolainnya.php?product=3");" & @CRLF & _
" });" & @CRLF & _
"" & @CRLF & _
" $("#ebanking").click(function(){ " & @CRLF & _
" $("#contentpromolain2").load("ajax.promolainnya.php?product=4");" & @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