On 30 Apr, 20:00, Steven Bethard <[EMAIL PROTECTED]> wrote:
> Well then it seems like you might want to rethink this rule-file
> approach since your problem is clearly not amenable to regular expressions.
[cut]
> That said, here's a regexp that might work::
>      ((?!two:).)*one((?!two:).)*
> That makes a negative lookahead assertion at each character in the string.

But match again something so don't work like i wanted.

Maybe a right approach will be another if after the first one? Like:
   for y in range(0, len(skip_lst) ):
                 if (re.search(skip_lst[y], line)):
                                     if
(re.search(skip_lst_negative[y], line)):
                                                   skip=1
                                                   break
and in the rule-file, i could add a new column and check to do the if
just if the second column is not empty.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to