[Tutor] re.compile ??
Wed Apr 23 13:24:01 2003
> MA> I am not getting what should be the outcome of this line
> MA> numberAddedRE = re.compile("(.*)#\d+$")
> MA> I tried to read it from /usr/lib/python2.2/re.py
> MA> But i am not getting it properly. Please suggest regarding this.
> Something like any string that ends with # + sequences of digits:
> dpwufhuwefbe[#123, etc.
Can you explain what you want to get from the regular expression? The main
problem here is that we, like Python, don't know what you expect the
output to be. *grin*
Are you getting an error message from your program, or is it more that the
regex isn't detecting the patterns that you want it to detect? If you
give us some examples of things you'd like numberAddedRE to recognize, we
should be better able to understand the purpose of the regular expression.
Best of wishes to you!