How to censor IP addresses in a file with Python?

Posted by Julio on Stack Overflow See other posts from Stack Overflow or by Julio
Published on 2010-05-07T08:02:07Z Indexed on 2010/05/07 8:08 UTC
Read the original article Hit count: 186

Filed under:
|

Hello everyone. I have a log file containing some Whois entries with relative IP addresses which I want to censor like: 81.190.123.123 in 81.190.xxx.xxx.

Is there a way to make such a conversion and rewrite the file contents without modifying the rest?

Thank you for the help!

© Stack Overflow or respective owner

Related posts about python

Related posts about regex