#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = ">{\d+}<"
Local $sString = "<Financials>" & @CRLF & _
" <IncomeStatement>" & @CRLF & _
" <Revenue>{0}</Revenue>" & @CRLF & _
" <OperatingIncome>{1}</OperatingIncome>" & @CRLF & _
" <NetIncome>{2}</NetIncome>" & @CRLF & _
" <BasicEPS>{3}</BasicEPS>" & @CRLF & _
" <AvgSharesOutstand>{4}</AvgSharesOutstand>" & @CRLF & _
" </IncomeStatement>" & @CRLF & _
" <BalanceSheet>" & @CRLF & _
" <CurrentAssets>{5}</CurrentAssets>" & @CRLF & _
" <NonCurrentAssets>{6}</NonCurrentAssets>" & @CRLF & _
" <TotalAssets>{7}</TotalAssets>" & @CRLF & _
" <CurrentLiabilities>{8}</CurrentLiabilities>" & @CRLF & _
" <TotalLiabilities>{9}</TotalLiabilities>" & @CRLF & _
" <TotalEquity>{10}</TotalEquity>" & @CRLF & _
" </BalanceSheet>" & @CRLF & _
" <CashFlow>" & @CRLF & _
" <OperatingCashFlow>{11}</OperatingCashFlow>" & @CRLF & _
" <CapitalExpenditure>{12}</CapitalExpenditure>" & @CRLF & _
" <FreeCashFlow>{13}</FreeCashFlow>" & @CRLF & _
" </CashFlow>" & @CRLF & _
"</Financials>"
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