On 11/22/09 16:05, Helmut Jarausch wrote:
On 11/22/09 14:58, Jelle Smet wrote:
Hi List,
I'm trying to match lines in python using the re module.
The end goal is to have a regex which enables me to skip lines which
have ok and warning in it.
But for some reason I can't get negative lookaheads wo
Tim Chase wrote:
import re
line='2009-11-22 12:15:441 lmqkjsfmlqshvquhsudfhqf qlsfh
qsduidfhqlsiufh qlsiuf qldsfhqlsifhqlius dfh warning qlsfj lqshf
lqsuhf lqksjfhqisudfh qiusdfhq iusfh'
re.match('.*(?!warning)',line)
<_sre.SRE_Match object at 0xb75b1598>
I would expect that this would NOT
On 11/22/09 14:58, Jelle Smet wrote:
Hi List,
I'm trying to match lines in python using the re module.
The end goal is to have a regex which enables me to skip lines which have ok
and warning in it.
But for some reason I can't get negative lookaheads working, the way it's explained in
"http://
import re
line='2009-11-22 12:15:441 lmqkjsfmlqshvquhsudfhqf qlsfh qsduidfhqlsiufh
qlsiuf qldsfhqlsifhqlius dfh warning qlsfj lqshf lqsuhf lqksjfhqisudfh qiusdfhq
iusfh'
re.match('.*(?!warning)',line)
<_sre.SRE_Match object at 0xb75b1598>
I would expect that this would NOT match as it's a neg
Hi List,
I'm trying to match lines in python using the re module.
The end goal is to have a regex which enables me to skip lines which have ok
and warning in it.
But for some reason I can't get negative lookaheads working, the way it's
explained in "http://docs.python.org/library/re.html";.
Con