Q for regexp experts
Harald Kirsch
kirschh at lionbioscience.com
Fri Dec 8 10:09:33 EST 2000
Even with perl-compatible regular expressions it seems to be
impossible to specify a pattern which matches
`the longest substring not containing separator' SEP
Put another way, from a given starting point, the pattern shall match
everything until just before the next occurence of SEP. A first
attempt is something like
[^SEP]*
but this disallows S', 'E' and 'P' in between the separators.
I tried something like (.(?!SEP))+ but it somehow does not work. Is it
at all possible to get this to work with regular expressions?
Harald Kirsch
--
----------------+------------------------------------------------------
Harald Kirsch | kirschh at lionbioscience.com | "How old is the epsilon?"
LION Bioscience | +49 6221 4038 172 | -- Paul Erdös
More information about the Python-list
mailing list