I'm using WinGrep to search for IP Addresses in a .txt file, but i can't figure out how to get it to use a regular expression to search. does anyone have any experience with this?
+1
A:
If you don't need to consider IPv6, only want numeric IP addresses without port numbers, and don't need to validate the addresses (i. e., not matching illegal addresses line 321.456.299.999
) then you can use
\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b
If you need to do any of the above things, please update your question.
Tim Pietzcker
2010-07-24 04:45:22
The + is not needed after \d as you specify {1,3}
M42
2010-07-24 08:59:55
Erm, yes. No idea how they got there :)
Tim Pietzcker
2010-07-24 11:43:29