Changing entities

Kent Johnson kent37 at tds.net
Fri Jun 10 12:20:06 EDT 2005


Daniel wrote:
> Hi Kent
> 
> This isn't work with the following line:
> FieldGraphic56    ::=       GraphicString EBCDIC BC= " " SIZE (56
> BYTES)
> 
> 
>>>>byter = re.compile(r'SIZE \((\d+) BYTE\)')

Because the string doesn't match the pattern, can you see the difference? Do you understand what the regex is looking for?

Another good way to learn about regexes is with the Regex Demo program distributed with Python. Look for Tools\Scripts\redemo.py

Kent



More information about the Python-list mailing list