#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?im) *((\/+.*\n*.*)|(\[.*\]\n*.*))*public [A-Za-z\_\?\<\>]* ([A-Za-z0-9\_]*) .*(\n| )*"
Local $sString = "[DatabaseGenerated(DatabaseGeneratedOption.None)]" & @CRLF & _
" public long Id { get; set; }" & @CRLF & _
"" & @CRLF & _
" [Required]" & @CRLF & _
" [StringLength(15)]" & @CRLF & _
" public string Email { get; set; }" & @CRLF & _
" public string CellPhone { get; set; }" & @CRLF & _
" public int NumChildren { get; set; }" & @CRLF & _
" public DateTime BirthDate { get; set; }" & @CRLF & _
" /// <summary>" & @CRLF & _
" /// Base64" & @CRLF & _
" /// </summary>" & @CRLF & _
" public string Image { get; set; }" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" public List<FullSdnOption> Optionen { get; set; }"
Local $sSubst = "$4 = person.$4,\n"
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