#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?i)\s+TStatusBar"
Local $sString = "inherited FormPadrao: TFormPadrao" & @CRLF & _
" Left = 354" & @CRLF & _
" Top = 155" & @CRLF & _
" Caption = 'FormPadrao'" & @CRLF & _
" ClientHeight = 342" & @CRLF & _
" ClientWidth = 655" & @CRLF & _
" KeyPreview = True" & @CRLF & _
" PopupMenu = MnPop_Principal" & @CRLF & _
" OnCloseQuery = FormCloseQuery" & @CRLF & _
" OnDeactivate = FormDeactivate" & @CRLF & _
" ExplicitWidth = 671" & @CRLF & _
" ExplicitHeight = 381" & @CRLF & _
" DesignSize = (" & @CRLF & _
" 655" & @CRLF & _
" 342)" & @CRLF & _
" PixelsPerInch = 96" & @CRLF & _
" TextHeight = 15" & @CRLF & _
" object Bv_Top: TBevel [0]" & @CRLF & _
" Left = 0" & @CRLF & _
" Top = 0" & @CRLF & _
" Width = 655" & @CRLF & _
" Height = 2" & @CRLF & _
" Align = alTop" & @CRLF & _
" end" & @CRLF & _
" object Sb_FormPadrao: TStatusBar [1]" & @CRLF & _
" Left = 0" & @CRLF & _
" Top = 317" & @CRLF & _
" Width = 655" & @CRLF & _
" Height = 25" & @CRLF & _
" Panels = <" & @CRLF & _
" item" & @CRLF & _
" Bevel = pbNone" & @CRLF & _
" Text = 'Usu'#225'rio'" & @CRLF & _
" Width = 100" & @CRLF & _
" end" & @CRLF & _
" item" & @CRLF & _
" Bevel = pbNone" & @CRLF & _
" Width = 50" & @CRLF & _
" end>" & @CRLF & _
" ParentColor = True" & @CRLF & _
" ParentFont = True" & @CRLF & _
" UseSystemFont = False" & @CRLF & _
" ExplicitTop = 323" & @CRLF & _
" end" & @CRLF & _
" object Pn_BaseToolBar: TPanel [2]" & @CRLF & _
" Left = 0" & @CRLF & _
" Top = 2" & @CRLF & _
" Width = 655" & @CRLF & _
" Height = 73" & @CRLF & _
" Align = alTop" & @CRLF & _
" BevelOuter = bvNone" & @CRLF & _
" ParentColor = True" & @CRLF & _
" TabOrder = 2" & @CRLF & _
" end" & @CRLF & _
" object Pn_BaseGrid: TPanel [3]" & @CRLF & _
" Left = 0" & @CRLF & _
" Top = 75" & @CRLF & _
" Width = 655" & @CRLF & _
" Height = 242" & @CRLF & _
" Align = alClient" & @CRLF & _
" BevelOuter = bvNone" & @CRLF & _
" BorderWidth = 3" & @CRLF & _
" ParentColor = True" & @CRLF & _
" TabOrder = 4" & @CRLF & _
" ExplicitLeft = 32" & @CRLF & _
" ExplicitTop = 95" & @CRLF & _
" ExplicitHeight = 222" & @CRLF & _
" end" & @CRLF & _
" inherited MinMax: TmgMinMax" & @CRLF & _
" Top = 7" & @CRLF & _
" MinTrackSize.X = 450" & @CRLF & _
" MinTrackSize.Y = 300" & @CRLF & _
" ExplicitTop = 7" & @CRLF & _
" end" & @CRLF & _
" object Mn_Principal: TMainMenu [6]" & @CRLF & _
" Left = 4" & @CRLF & _
" Top = 36" & @CRLF & _
" object miTabela: TMenuItem" & @CRLF & _
" Caption = '&Tabela'" & @CRLF & _
" object miInserir: TMenuItem" & @CRLF & _
" Caption = '&Inserir'" & @CRLF & _
" end" & @CRLF & _
" object miApagar: TMenuItem" & @CRLF & _
" Caption = '&Apagar'" & @CRLF & _
" end" & @CRLF & _
" object miPropriedades: TMenuItem" & @CRLF & _
" Caption = '&Editar'" & @CRLF & _
" end" & @CRLF & _
" object N4: TMenuItem" & @CRLF & _
" Caption = '-'" & @CRLF & _
" end" & @CRLF & _
" object miFechar: TMenuItem" & @CRLF & _
" Caption = '&Fechar'" & @CRLF & _
" OnClick = miFecharClick" & @CRLF & _
" end" & @CRLF & _
" end" & @CRLF & _
" object miEditar1: TMenuItem" & @CRLF & _
" Caption = '&Editar'" & @CRLF & _
" object miRecortar1: TMenuItem" & @CRLF & _
" Caption = '&Recortar'" & @CRLF & _
" end" & @CRLF & _
" object miCopiar1: TMenuItem" & @CRLF & _
" Caption = '&Copiar'" & @CRLF & _
" end" & @CRLF & _
" object miColar1: TMenuItem" & @CRLF & _
" Caption = '&Colar'" & @CRLF & _
" end" & @CRLF & _
" end" & @CRLF & _
" object miExibir: TMenuItem" & @CRLF & _
" Caption = '&Exibir'" & @CRLF & _
" object miBarradeFerramentas: TMenuItem" & @CRLF & _
" Caption = 'Barra de &Ferramentas'" & @CRLF & _
" object miNaoExibir: TMenuItem" & @CRLF & _
" Caption = '&N'#227'o Exibir'" & @CRLF & _
" GroupIndex = 1" & @CRLF & _
" RadioItem = True" & @CRLF & _
" OnClick = mi_NaoExibirClick" & @CRLF & _
" end" & @CRLF & _
" object N5: TMenuItem" & @CRLF & _
" Caption = '-'" & @CRLF & _
" GroupIndex = 1" & @CRLF & _
" RadioItem = True" & @CRLF & _
" end" & @CRLF & _
" object miAlto: TMenuItem" & @CRLF & _
" Caption = '&Alto'" & @CRLF & _
" GroupIndex = 1" & @CRLF & _
" RadioItem = True" & @CRLF & _
" OnClick = mi_AltoClick" & @CRLF & _
" end" & @CRLF & _
" object miBaixo: TMenuItem" & @CRLF & _
" Caption = '&Baixo'" & @CRLF & _
" GroupIndex = 1" & @CRLF & _
" RadioItem = True" & @CRLF & _
" OnClick = mi_BaixoClick" & @CRLF & _
" end" & @CRLF & _
" end" & @CRLF & _
" object miBarradeStatus: TMenuItem" & @CRLF & _
" Caption = 'Barra de &Status'" & @CRLF & _
" OnClick = mi_BarradeStatusClick" & @CRLF & _
" end" & @CRLF & _
" object mi_SepN3: TMenuItem" & @CRLF & _
" Caption = '-'" & @CRLF & _
" end" & @CRLF & _
" object mi_Informacoesdajanela1: TMenuItem" & @CRLF & _
" Caption = 'Informa'#231#245'es desta Janela'" & @CRLF & _
" OnClick = mi_Informacoesdajanela1Click" & @CRLF & _
" end" & @CRLF & _
" object mi_Sepm9: TMenuItem" & @CRLF & _
" Caption = '-'" & @CRLF & _
" Visible = False" & @CRLF & _
" end" & @CRLF & _
" object mi_OcorrenciaAuditoria: TMenuItem" & @CRLF & _
" Caption = 'Logs de Auditoria'" & @CRLF & _
" Visible = False" & @CRLF & _
" OnClick = mi_OcorrenciaAuditoriaClick" & @CRLF & _
" end" & @CRLF & _
" end" & @CRLF & _
" object Mi_Ajuda: TMenuItem" & @CRLF & _
" Caption = '&Ajuda'" & @CRLF & _
" object Mi_AjudaProcesso: TMenuItem" & @CRLF & _
" Caption = 'Ajuda &Processo'" & @CRLF & _
" ShortCut = 112" & @CRLF & _
" OnClick = Mi_AjudaProcessoClick" & @CRLF & _
" end" & @CRLF & _
" object Mi_AjudaTela: TMenuItem" & @CRLF & _
" Caption = 'Ajuda &Tela'" & @CRLF & _
" ShortCut = 16496" & @CRLF & _
" OnClick = Mi_AjudaTelaClick" & @CRLF & _
" end" & @CRLF & _
" object Mi_HistoricoAlteracoes: TMenuItem" & @CRLF & _
" Caption = '&Hist'#243'rico de altera'#231#245'es'" & @CRLF & _
" Visible = False" & @CRLF & _
" OnClick = Mi_HistoricoAlteracoesClick" & @CRLF & _
" end" & @CRLF & _
" end" & @CRLF & _
" end" & @CRLF & _
" inherited mgPopupImpressao: TmgPopupMenu" & @CRLF & _
" Left = 4" & @CRLF & _
" end" & @CRLF & _
" object MnPop_Principal: TPopupMenu" & @CRLF & _
" Left = 34" & @CRLF & _
" Top = 36" & @CRLF & _
" object mi_Inserir: TMenuItem" & @CRLF & _
" Caption = '&Inserir'" & @CRLF & _
" end" & @CRLF & _
" object mi_Apagar: TMenuItem" & @CRLF & _
" Caption = '&Apagar'" & @CRLF & _
" end" & @CRLF & _
" object mi_Editar: TMenuItem" & @CRLF & _
" Caption = '&Editar'" & @CRLF & _
" end" & @CRLF & _
" object N1: TMenuItem" & @CRLF & _
" Caption = '-'" & @CRLF & _
" end" & @CRLF & _
" object mi_BarradeFerramentas: TMenuItem" & @CRLF & _
" Caption = '&Barra de Ferramentas'" & @CRLF & _
" object mi_NaoExibir: TMenuItem" & @CRLF & _
" Caption = '&N'#227'o Exibir'" & @CRLF & _
" GroupIndex = 1" & @CRLF & _
" RadioItem = True" & @CRLF & _
" OnClick = mi_NaoExibirClick" & @CRLF & _
" end" & @CRLF & _
" object N2: TMenuItem" & @CRLF & _
" Caption = '-'" & @CRLF & _
" GroupIndex = 1" & @CRLF & _
" RadioItem = True" & @CRLF & _
" end" & @CRLF & _
" object mi_Alto: TMenuItem" & @CRLF & _
" Caption = '&Alto'" & @CRLF & _
" GroupIndex = 1" & @CRLF & _
" RadioItem = True" & @CRLF & _
" OnClick = mi_AltoClick" & @CRLF & _
" end" & @CRLF & _
" object mi_Baixo: TMenuItem" & @CRLF & _
" Caption = '&Baixo'" & @CRLF & _
" GroupIndex = 1" & @CRLF & _
" RadioItem = True" & @CRLF & _
" OnClick = mi_BaixoClick" & @CRLF & _
" end" & @CRLF & _
" end" & @CRLF & _
" object mi_BarradeStatus: TMenuItem" & @CRLF & _
" Caption = 'Ba&rra de Status'" & @CRLF & _
" OnClick = mi_BarradeStatusClick" & @CRLF & _
" end" & @CRLF & _
" end" & @CRLF & _
"end"
Local $sSubst = " TMgStatusBar"
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