#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?mis)((object|inherited) \w+:[ ](TMgDBEdit).*?)((Color = clInactiveCaptionText\n)|(\n\s+end))"
Local $sString = " object Ed_PRO_ST_DESCRICAO: TMgDBEdit" & @CRLF & _
" Left = 132" & @CRLF & _
" Top = 81" & @CRLF & _
" Width = 675" & @CRLF & _
" Height = 21" & @CRLF & _
" AutoSize = False" & @CRLF & _
" Color = clInactiveCaptionText" & @CRLF & _
" DataField = 'PRO_ST_DESCRICAO'" & @CRLF & _
" DataSource = Dm_AdmInt.Ds_Produtos_" & @CRLF & _
" TabOrder = 4" & @CRLF & _
" OnChange = Ed_PRO_ST_DESCRICAOChange" & @CRLF & _
" OnExit = Ed_PRO_ST_DESCRICAOExit" & @CRLF & _
" OnKeyPress = Ed_PRO_ST_DESCRICAOKeyPress" & @CRLF & _
" Password = False" & @CRLF & _
" end" & @CRLF & _
" object Ed_PRO_ST_NARRATIVA1: TMgDBMemo" & @CRLF & _
" Left = 132" & @CRLF & _
" Top = 157" & @CRLF & _
" Width = 675" & @CRLF & _
" Height = 78" & @CRLF & _
" DataField = 'PRO_ST_NARRATIVA'" & @CRLF & _
" DataSource = Dm_AdmInt.Ds_Produtos_" & @CRLF & _
" MaxLength = 500" & @CRLF & _
" ScrollBars = ssVertical" & @CRLF & _
" TabOrder = 7" & @CRLF & _
" end" & @CRLF & _
""
Local $sSubst = "\1ParentFont = True\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