#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "<text(.[^>]+)>\n(\s+)(.+)\n(.+)<\/text>"
Local $sString = "<text class="wx-text_tz7UYs" data-c_e_id="wx-textf2d09dd7377909fe">" & @CRLF & _
" 测试动画:比例" & @CRLF & _
" </text>" & @CRLF & _
"<text class="wx-text_tz7UYs" data-c_e_id="wx-textf2d09dd7377909fe">" & @CRLF & _
" 测试动例" & @CRLF & _
" </text>"
Local $sSubst = "<text ${1}>${3}</text>"
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