Regular Expressions in Python

fossil_blue noelrivera at excite.com
Mon Mar 1 09:18:11 EST 2004


Dear Gurus,

  I am trying to find out how to write an effective regular expression
in python for the following scenario:

   "any number of leading spaces at the beginning of a line" "follow
by a string" "there maybe a string that starts with *"

for example:

  END  *This is a comment

but I don't want to match this:

   END  e * This is a line with an error (e)

thanks,
Noel



More information about the Python-list mailing list