Monthly Archives: March 2010

Sprinkling an ‘or’ on your regex

Had some fun today getting this working. If you need to do a boolean ‘or’ comparison inside a regex with python, this is how I did it: if (re.match(r”([0-9]{6}|[0-9]{8})$”, mydate)): In this case, I was trying to either match a … Continue reading

Posted in Open Source/Internet | 1 Comment