#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(^\S+).*"
Local $sString = "along ad.向前;和…一起;一同 prep. 沿着;顺着 " & @CRLF & _
"aloud ad. 大声地 " & @CRLF & _
"already ad. 已经 " & @CRLF & _
"also ad. 也 " & @CRLF & _
"although conj. 虽然,尽管 " & @CRLF & _
"altogether ad. 总共 " & @CRLF & _
"always ad. 总是;一直;永远 " & @CRLF & _
"am v. be的人称形式之一 📷" & @CRLF & _
"a.m./A.M. 📞 n. 午前,上午" & @CRLF & _
"America * n. 美国;美洲"
Local $sSubst = "$1"
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