#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(namespace FeedStore\.Stores\.EF\.Entities\.Master)(\r\n|\n)({)(\r\n|\n)\s+(public partial class )\s*(\w+)"
Local $sString = "using System;" & @CRLF & _
"using System.Collections.Generic;" & @CRLF & _
"" & @CRLF & _
"#nullable disable" & @CRLF & _
"" & @CRLF & _
"namespace FeedStore.Stores.EF.Entities.Master" & @CRLF & _
"{" & @CRLF & _
" public partial class Admin" & @CRLF & _
" {" & @CRLF & _
" public int Id { get; set; }" & @CRLF & _
" public string Name { get; set; }" & @CRLF & _
" public string Alias { get; set; }" & @CRLF & _
" public int TenantId { get; set; }" & @CRLF & _
" public DateTime Created { get; set; }" & @CRLF & _
" public string CreatedBy { get; set; }" & @CRLF & _
" public DateTime? Modified { get; set; }" & @CRLF & _
" public string ModifiedBy { get; set; }" & @CRLF & _
" }" & @CRLF & _
"}" & @CRLF & _
""
Local $sSubst = "using FeedStore.Stores.EF.Contracts;\r\n\r\n$1$2$3$4\t$5$6 : IAuditableModified, IAuditableAdded"
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