Re: re module - cannot make expression

2005-01-31 Thread Steven Bethard
Laszlo Zsolt Nagy wrote: I would like to match strings not beginning with '/webalizer'. How can I do this? Are you sure you need a regular expression? The str.startswith method is what I would normally use to solve this kind of problem: py> lst = ['aax', 'abx', 'acx', 'aay', 'aby', 'acy'] py> [

Re: re module - cannot make expression

2005-01-31 Thread Steve Holden
Laszlo Zsolt Nagy wrote: Hi All! I would like to match strings not beginning with '/webalizer'. How can I do this? The only one negation command is ^ inside [] but it cannot be used here. I looked over "re" examples on the net but I could not find an example about how to match "not beginning wit

re module - cannot make expression

2005-01-31 Thread Laszlo Zsolt Nagy
Hi All! I would like to match strings not beginning with '/webalizer'. How can I do this? The only one negation command is ^ inside [] but it cannot be used here. I looked over "re" examples on the net but I could not find an example about how to match "not beginning with" type expressions. Tha