regular expression back references

John Machin sjmachin at
Sat Aug 9 07:16:30 CEST 2003

sjmachin at (John Machin) wrote in message news:<c76ff6fc.0308081738.579e001f at>...
> ruach at (Matthew) wrote in message news:<ec1162c7.0308081412.4c0d2fca at>...

> > macExpression = "^[0-9A-F]{1,2}(\:|\.|\-)[0-9A-F]{1,2}\1[0-9A-F]{1,2}\1[0-9A-F]{1,2}\1[0-9A-F]{1,2}\1[0-9A-F]{1,2}$:

> Four problems (1) Your pattern has 5 occurrences of [0-9-A-F] but your
> data has 6 

Make that 3 problems. I can't count -- that's why i use computers!

More information about the Python-list mailing list