#include <Array.au3>
Local $sSource = 'Received file d:\work\☆文件夹名\文件夹2名\这里是从键盘输入AbC的敏感字等等.txt successfully (10 Bytes/sec - 1024 Bytes)'
;~MsgBox(0, '源字符串', $sSource)
Local $sKey = InputBox("第三阶段:搜索","请输入需要查找的关键字"& @CRLF & "(说明:西文区分大小写)", '敏感')
If @Error Then Exit
Local $sEscape = '(\.|\||\*|\?|\+|\(|\)|\{|\}|\[|\]|\^|\$|\\)'
Local $aSRE = StringRegExp($sSource, '(?mi)^\h*Received.+?(\w:.+?(?-i)' & StringRegExpReplace($sKey, $sEscape, '\\$1') & '.*?\.(?i)txt)\h+successfully\h+\((\d+)\h+Bytes/sec\h+\-\h+(\d+)\h+Bytes\)(?=\v|$)', 3)
If @Error Then Exit MsgBox(48, $sKey, '无匹配')
_ArrayDisplay($aSRE, UBound($aSRE))
|