#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)^(.*?)\bdefault\b"
Local $sString = "../app/code/community/Company/Module/Block/Adminhtml/Location/Grid.php" & @CRLF & _
"../app/code/community/Company/Module/Block/Adminhtml/Location/Import.php" & @CRLF & _
"../app/code/community/Company/Module/Block/Adminhtml/Location/Edit/Form.php" & @CRLF & _
"../app/code/community/Company/Module/Block/Adminhtml/Location/Edit/Import.php" & @CRLF & _
"../app/code/community/Company/Module/Block/Adminhtml/Location/Edit/Tabs.php" & @CRLF & _
"../app/code/community/Company/Module/Block/Adminhtml/Location/Edit/Tab/Form.php" & @CRLF & _
"../app/code/community/Company/Module/Block/Adminhtml/Location/Edit/Tab/Import.php" & @CRLF & _
"../app/code/community/Company/Module/controllers/IndexController.php" & @CRLF & _
"../app/code/community/Company/Module/controllers/LocationController.php" & @CRLF & _
"../app/design/adminhtml/default/default/layout/pmodule.xml" & @CRLF & _
"../app/design/frontend/default/default/layout/pmodule.xml" & @CRLF & _
"../app/design/frontend/default/default/template/company/module/gmap.phtml"
Local $sSubst = "\1rwd"
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