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 date string using 8 digits, YYYYMMDD, or 6 digits, YYMMDD.