match() wants the regex to start at position 0. If your first char is not 'X' ==> No match try search() Read the python doc about the difference.
2009/1/7 Rockmaster <rockmast...@gmail.com>: > > Hello, > > I'm a bit confused by regular expressions in Python. I tested the > following regex with http://re.dabase.com/, and it got a match there, > but I can't seem to get a match once I run this: > > ( example line from xlines: X= 0.0000 ) > > progX = re.compile('X=\s*\d+\.?\d*', re.I) > xparts = [] > for val in xlines: > mX = progX.match(val) > > Any ideas? > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---