µtorrent-Guest Posted May 30, 2007 Report Share Posted May 30, 2007 if you want the port number included behind a ":" in the results or not.Because Firon told me that ignoring the ":" automaticly is not a valid request since ":"'s aren't allowed in the ipfilter.dat according to the standard.http://forum.utorrent.com/viewtopic.php?pid=253909#p253909 Link to comment Share on other sites More sharing options...
hermanm Posted April 24, 2008 Report Share Posted April 24, 2008 Yes, I like this idea as well. Seems like a waste to include ports in ipfilter.dat when it is not needed. Link to comment Share on other sites More sharing options...
Firon Posted April 24, 2008 Report Share Posted April 24, 2008 ultraedit-32 + regex = no more port. Link to comment Share on other sites More sharing options...
hermanm Posted April 24, 2008 Report Share Posted April 24, 2008 What would be the regex and does it work with ipv6 as well? Link to comment Share on other sites More sharing options...
Ultima Posted April 24, 2008 Report Share Posted April 24, 2008 (.*):[0-9]*$Replace that with $1 or \1 (whatever the editor uses as a backreference).Yes, it works on IPv6. In fact, it doesn't really matter *what* each line contains -- if it has SOMETHING:123890345784937584935, it'll simply trim the line to SOMETHING. Link to comment Share on other sites More sharing options...
hermanm Posted April 24, 2008 Report Share Posted April 24, 2008 Okay, inspired by the regex idea, there's another way using sed (stream editor): sed-3.59.zipHere's the recommended sed string ( s/^\(.*\):.*/\1/g ) for deleting everything after and including the colon.I used it like this from the command prompt:c:\Program Files\uTorrent> sed-3.59 s/^\(.*\):.*/\1/g ipfilter.dat > ipfilter.newdelete ipfilter.dat then rename ipfilter.new to ipfilter.dat Link to comment Share on other sites More sharing options...
GTHK Posted April 24, 2008 Report Share Posted April 24, 2008 Your instruction automated (I'm bored ).sed-3.59 s/^\(.*\):.*/\1/g ipfilter.dat > ipfilter.newdel ipfilter.datren ipfilter.new ipfilter.dat Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.