Solved python regex raising exception “unmatched group”

If your a regex guru, and you know why you came here, you can go straight to the brief explanation. If not just keep reading. I found a workaround for python bug 1519638. It most definitely will not solve all of the puzzles out there but it stops breaking the sub method for replacing with [...]

July 11, 2008  Tags: , , , ,   Posted in: All ENGLISH articles, Technical  10 Comments

A python function to capture an IP address or range

I recently needed a function that validates an IP address or network range. Since my python application will pass it as a parameter to iptables it needs to be correct and not ‘close to’. So I dug in … Validating an IP address or range with just a regex seems like self castigation. I looked [...]

June 12, 2008  Tags: , , , , ,   Posted in: All ENGLISH articles, Technical  No Comments