Why no match?

Skip Montanaro skip at pobox.com
Mon Dec 17 17:54:11 EST 2001


    Robin> my own stupidity the patter should be
    Robin> re.compile(r'^self\s*\.\s*test\s*=\s*\d+\s*$').match('self.test=11')

Also, if you're using the match method there's no need to include "^" at the
start.  (Are there siutations where it makes a difference?)

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list