spaces in re.compile()

rbt rbt at
Mon Mar 21 17:03:24 CET 2005

Is it possible to use spaces in a re.compile()?

For example, I want to make sure one space exists right before this 
string and right after it:

re.compile ('\d{3,3}\.\d{3,3}\.\d{3,3}\.\d{3,3}')

I've tried this, but it didn't work:

re.compile (' \d{3,3}\.\d{3,3}\.\d{3,3}\.\d{3,3} ')

Any ideas?

More information about the Python-list mailing list