View Single Post
Join Date: Oct 2008
Posts: 2
Reputation: unkwntech is an unknown quantity at this point 
Solved Threads: 0
unkwntech unkwntech is offline Offline
Newbie Poster

Regex for re.match not working as expected.

 
0
  #1
Oct 9th, 2008
I have the following code:
  1. import re
  2. string = 'c:\test.doc'
  3. if re.match(r":\\[0-9a-z]", string):
  4. ##r":\\[0-9a-z]" should match ':\t'
  5. print 'true'
  6. else:
  7. print 'false'
the problem I am having is that this is always evaluating to false.
Reply With Quote