Changing entities

Daniel danricofer at gmail.com
Wed Jun 8 09:03:03 EDT 2005


Hello all

I need to build a program that check the sintax in a line:

SIZE (1 BYTE)

and change the correct number of bytes to the following format:

SIZE(1)

without the "BYTE" word. But, the number of bytes can be over 3 digits,
and the entitie can't have spaces but the correct number of bytes in
parentheses, like "SIZE (1024 BYTE)" to "SIZE(1024)".

Does anyone already done this or similar sintax using re?

Thank you




More information about the Python-list mailing list