#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)([?\[\]])"
Local $sString = "[Input]" & @CRLF & _
"NewAutoController = New Input:" & @CRLF & _
"ControllerDisconnect = The controller has disconnected. Please re-connect the controller to resume." & @CRLF & _
"" & @CRLF & _
"[levels]" & @CRLF & _
"Chapter = Chapter" & @CRLF & _
"Act = Act" & @CRLF & _
"MountainPeak = Mountain Peak" & @CRLF & _
"FreeRoamDesc = Do Whatever You'd Like" & @CRLF & _
"" & @CRLF & _
"[coop]" & @CRLF & _
"SyncBusyWait0 = Waiting for player 1!" & @CRLF & _
"SyncBusyWait1 = Waiting for player 2!" & @CRLF & _
"" & @CRLF & _
"[cheats]" & @CRLF & _
"disallowed_outside_editor = Not in Editor" & @CRLF & _
"" & @CRLF & _
"[Console]" & @CRLF & _
"OfflineMode = Do you want to play offline? Xbox Live features won't be available and data will not save." & @CRLF & _
"FailedLogin = Unable to log in at this time. Please wait and try again." & @CRLF & _
"Yes = Yes" & @CRLF & _
"No = No"
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