Код:
object Label1: TLabel
Left = 50
Top = 44
Width = 25
Height = 13
Caption = 'Enter'
end
object edLine: TEdit
Left = 136
Top = 40
Width = 121
Height = 21
TabOrder = 0
Text = 'Text'
end
object btOK: TButton
Left = 146
Top = 342
Width = 75
Height = 25
Caption = 'OK'
TabOrder = 1
OnClick = btOKClick
end
object Memo: TMemo
Left = 34
Top = 66
Width = 355
Height = 269
Lines.Strings = (
'11'
'12')
TabOrder = 2
end
object edLine: TcxTextEdit
Left = 136
Top = 40
Width = 121
Height = 21
TabOrder = 0
Text = 'Text'
Style.LookAndFeel.Kind = lfOffice11
StyleDisabled.LookAndFeel.Kind = lfOffice11
StyleFocused.LookAndFeel.Kind = lfOffice11
StyleHot.LookAndFeel.Kind = lfOffice11
end
def FindDFM_object(otype, text):
w = '\[a-zA-Z0-9_ ]'
obj_re = re.compile("object \w*: "+otype+".*end\s*end", re.DOTALL)
return obj_re.search(text)
как составить правильное регулярное выражение?