Changing entities
Daniel
danricofer at gmail.com
Fri Jun 10 11:08:21 EDT 2005
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
More information about the Python-list
mailing list