#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "<(\/)?(.*?)>"
Local $sString = "<?xml version="1.0" encoding="UTF-8"?>" & @CRLF & _
"<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">" & @CRLF & _
"<plist version="1.0">" & @CRLF & _
"<dict>" & @CRLF & _
" <key>fileTypes</key>" & @CRLF & _
" <array>" & @CRLF & _
" <string>xmp</string>" & @CRLF & _
" </array>" & @CRLF & _
" <key>name</key>" & @CRLF & _
" <string>XMP</string>" & @CRLF & _
" <key>patterns</key>" & @CRLF & _
" <array>" & @CRLF & _
" <dict>" & @CRLF & _
" <key>match</key>" & @CRLF & _
" <string>?????????????????????????????????</string>" & @CRLF & _
" <key>name</key>" & @CRLF & _
" <string>source.keyword.xmp</string>" & @CRLF & _
" </dict>" & @CRLF & _
" </array>" & @CRLF & _
" <key>scopeName</key>" & @CRLF & _
" <string>source.xmp</string>" & @CRLF & _
" <key>uuid</key>" & @CRLF & _
" <string>750d3b02-a1bc-4b09-a794-1b78c54a4e21</string>" & @CRLF & _
"</dict>" & @CRLF & _
"</plist>"
Local $sSubst = "[\1\2]"
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