Hi Kent This isn't work with the following line: FieldGraphic56 ::= GraphicString EBCDIC BC= " " SIZE (56 BYTES)
>>> byter = re.compile(r'SIZE \((\d+) BYTE\)') >>> s = 'SIZE (1 BYTE)' >>> byter.sub(r'SIZE(\1)', s) 'SIZE(1)' >>> byter.sub(r'SIZE(\1)', line) 'FieldGraphic56 ::= GraphicString EBCDIC BC= " " SIZE (56 BYTES)' >>> line 'FieldGraphic56 ::= GraphicString EBCDIC BC= " " SIZE (56 BYTES)' >>> Any idea? :-p -- http://mail.python.org/mailman/listinfo/python-list