#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "<\/?(\d)"
Local $sString = "<?xml version="1.0"?>" & @CRLF & _
"<data>" & @CRLF & _
" <client_name>Awesome Client</client_name>" & @CRLF & _
" <account_number/>" & @CRLF & _
" <date_created>02/12/2016</date_created>" & @CRLF & _
" <form_number>4126</form_number>" & @CRLF & _
" <customer_po/>" & @CRLF & _
" <terms_name>Credit Card</terms_name>" & @CRLF & _
" <date_shipped>12/31/1969</date_shipped>" & @CRLF & _
" <billing_contact_email/>" & @CRLF & _
" <billing_contact_address_line_1/>" & @CRLF & _
" <billing_contact_address_line_2/>" & @CRLF & _
" <billing_contact_address_line_3/>" & @CRLF & _
" <billing_contact_address_line_4/>" & @CRLF & _
" <billing_contact_address_city/>" & @CRLF & _
" <billing_contact_address_state>British Columbia</billing_contact_address_state>" & @CRLF & _
" <billing_contact_address_postal/>" & @CRLF & _
" <billing_contact_address_country>Canada</billing_contact_address_country>" & @CRLF & _
" <shipping_contact_address_line_1/>" & @CRLF & _
" <shipping_contact_address_line_2/>" & @CRLF & _
" <shipping_contact_address_line_3/>" & @CRLF & _
" <shipping_contact_address_line_4/>" & @CRLF & _
" <shipping_contact_address_city/>" & @CRLF & _
" <shipping_contact_address_state>British Columbia</shipping_contact_address_state>" & @CRLF & _
" <shipping_contact_address_postal/>" & @CRLF & _
" <shipping_contact_address_country>Canada</shipping_contact_address_country>" & @CRLF & _
" <billing_contact_first_name>another</billing_contact_first_name>" & @CRLF & _
" <billing_contact_last_name>client</billing_contact_last_name>" & @CRLF & _
" <client_rep_full_name>Rob Montebelli</client_rep_full_name>" & @CRLF & _
" <order_rep_full_name>Mark Graham</order_rep_full_name>" & @CRLF & _
" <job_name>77777</job_name>" & @CRLF & _
" <job_number>2620</job_number>" & @CRLF & _
" <event_type>Donor Gift</event_type>" & @CRLF & _
" <due_date>02/12/2016</due_date>" & @CRLF & _
" <shipping_method/>" & @CRLF & _
" <currency>CAD</currency>" & @CRLF & _
" <total_taxes>0.00</total_taxes>" & @CRLF & _
" <total_subtotal>1,760.16</total_subtotal>" & @CRLF & _
" <total>1,760.16</total>" & @CRLF & _
" <items>" & @CRLF & _
" <item0>" & @CRLF & _
" <taxes>" & @CRLF & _
" <0>E</0>" & @CRLF & _
" </taxes>" & @CRLF & _
" <title>1889-24</title>" & @CRLF & _
" <quantity>6</quantity>" & @CRLF & _
" <description>Carhartt (R) Signature Utility Duffel; TBD TBD</description>" & @CRLF & _
" <unit_price>159.32</unit_price>" & @CRLF & _
" </item0>" & @CRLF & _
" <item1>" & @CRLF & _
" <taxes>" & @CRLF & _
" <0>E</0>" & @CRLF & _
" </taxes>" & @CRLF & _
" <title>0022-56</title>" & @CRLF & _
" <quantity>12</quantity>" & @CRLF & _
" <description>Zoom (TM) DayTripper Sling Compu-Messenger; TBD TBD</description>" & @CRLF & _
" <unit_price>67.02</unit_price>" & @CRLF & _
" </item1>" & @CRLF & _
" </items>" & @CRLF & _
"</data>"
Local $sSubst = "<number$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