#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?i)\d{1,2}\/\d{1,2}|https:\/\/docs\.google\.com\/spreadsheet\/ccc\?key=[\w\n]*&usp=drive_web&pli=1#gid=\d{1,}"
Local $sString = "Hi All" & @CRLF & _
" " & @CRLF & _
" 12/14日訂購的廠商為 一品魯肉飯 " & @CRLF & _
" " & @CRLF & _
"請於下列連結中登記" & @CRLF & _
" " & @CRLF & _
"https://docs.google.com/spreadsheet/ccc?key=0AgZpbYtnWitPdDNjWFp4aG9yVm1IQlFWaldlTU5MSXc&usp=drive_web&pli=1#gid=126" & @CRLF & _
" " & @CRLF & _
"請於上午10:10前登記完成, 逾時不候." & @CRLF & _
" " & @CRLF & _
"============================================================================================" & @CRLF & _
" " & @CRLF & _
"12/15日訂購的廠商為 北一排骨便當 " & @CRLF & _
" " & @CRLF & _
"請於下列連結中登記" & @CRLF & _
" " & @CRLF & _
"https://docs.google.com/spreadsheet/ccc?key=0AgZpbYtnWitPdDNjWFp4aG9yVm1IQlFWaldlTU5MSXc&usp=drive_web&pli=1#gid=138" & @CRLF & _
" " & @CRLF & _
" " & @CRLF & _
"請於上午10:10前登記完成, 逾時不候." & @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