RegExp: "wontmatch"-function

pjacobi.de at googlemail.com pjacobi.de at googlemail.com
Mon Oct 13 12:40:07 EDT 2008


Dear All,

I'm looking for a function which, given a regexp re and  and a string
str, returns
whether re won't match any string starting with str. (so it would
always
return False if str is "" or if str itself matches re -- but that are
only the
easy cases).

I have the vague feeling that the internal workings of the regexp
matcher
can answer the question, but that there's no way to get this result
from Python code.

Any ideas or prior art on how to get this function?

Regards,
Peter



More information about the Python-list mailing list