#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)\n(?=[^"]+?"\s*$)"
Local $sString = "ability,n. 能力,能耐;才能" & @CRLF & _
"able,adj. 能; 有能力的;能干的" & @CRLF & _
"about,"prep. 关于;大约" & @CRLF & _
"n. 大致;粗枝大叶;不拘小节的人" & @CRLF & _
"adj. 在附近的;四处走动的;在起作用的" & @CRLF & _
"adv. 大约;周围;到处"" & @CRLF & _
"above,"prep. 超过;在……上面;在……之上" & @CRLF & _
"n. 上文" & @CRLF & _
"adj. 上文的" & @CRLF & _
"adv. 在上面;在上文"" & @CRLF & _
"accident,n. 事故;意外; 意外事件;机遇" & @CRLF & _
"accurate,adj. 精确的" & @CRLF & _
"ache,"n. 疼痛" & @CRLF & _
"vi. 疼痛;渴望"" & @CRLF & _
"activity,n. 活动;行动;活跃" & @CRLF & _
"actor,n. 男演员;行动者;作用物" & @CRLF & _
"actress,n. 女演员" & @CRLF & _
"actually,adv. 实际上;事实上"
Local $sSubst = " "
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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