#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(餐盘|餐具|餐盒)收(一下|下|掉)?|收(一下|下)?(餐盘|餐具|餐盒|餐)"
Local $sString = "收一下餐。" & @CRLF & _
"吗,我总是吗个服务员帮我收下餐盘。" & @CRLF & _
"收一下餐。" & @CRLF & _
"收餐?" & @CRLF & _
"帮我叫个服务员收一下餐盘。" & @CRLF & _
"嗯,收一下餐具。" & @CRLF & _
"收一下餐。" & @CRLF & _
"就是麻烦你收费早餐算呢?" & @CRLF & _
"收一下餐。" & @CRLF & _
"帮我收一下餐盘。" & @CRLF & _
"帮我收一下餐盘。" & @CRLF & _
"嗯,帮我收回去好吗?我这个用餐有用完了。" & @CRLF & _
"收餐?" & @CRLF & _
"请帮我收一下餐盘。" & @CRLF & _
"" & @CRLF & _
"收一下餐。" & @CRLF & _
"吗,我总是吗个服务员帮我收下餐盘。" & @CRLF & _
"收一下餐。" & @CRLF & _
"我刚刚有一份那个中餐收到了,没有?" & @CRLF & _
"早餐九点半收。" & @CRLF & _
"收餐?" & @CRLF & _
"帮我叫个服务员收一下餐盘。" & @CRLF & _
"嗯,收一下餐具。" & @CRLF & _
"收一下餐。" & @CRLF & _
"就是麻烦你收费早餐算呢?" & @CRLF & _
"收一下餐。" & @CRLF & _
"帮我收一下餐盘。" & @CRLF & _
"帮我收一下餐盘。" & @CRLF & _
"早餐收钱吗?" & @CRLF & _
"嗯,帮我收回去好吗?我这个用餐有用完了。" & @CRLF & _
"把那个餐具收掉。" & @CRLF & _
"帮我把餐盒拿收拾下房间。" & @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