To extract first three letters 'abc' and three sets of three-digits numbers in 000_111_222 I am using the following expression:
text = 'abc_000_111_222'
print re.findall('^[a-z]{3}_[0-9]{3}_[0-9]{3}_[0-9]{3}', text)
But the expression returns empty list when instead of underscores there are minuses or periods used instead: abc.000.111.222 or abc-000-111-222 or any combination of it like: abc_000.111-222
Sure I could use a simple replace method to unify the text variable text=text.replace('-','_').replace('.','_')
But I wonder if instead of replacing I could modify regex expression that would recognize the underscores, minuses and periods.

print re.findall(r'^[a-z]{3}(?:[_.-]\d{3}){3}$', text)should work__before first number as well.