Python regexp exclude problem

Lutfi Oduncuoglu lutfioduncuoglu at gmail.com
Wed Jun 1 10:20:58 EDT 2011


Hello,

I am trying to write a script for adding ip address to a list. Those ip
addresses coming thorough from our edge router.
I have a line in may script like

      if  any(s not in z2 for s
in('144.122.','188.38','193.140.99.2','213.161.144.166','92.45.88.242')):
          os.system(" echo " +z2+ " >> kapat_py_log")

However ip addresses like  213.161.144.166 are added to the list. What can I
do about this problem?

Thank You,

Lutfi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110601/a48e33af/attachment.html>


More information about the Python-list mailing list