Skip to content
Stuff I'm Up To
Go back

IP Address RegEx

Edit page

Searching for IP addresses in a file or files:

grep -oE '((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])' file

Edit page
Share this post:

Previous Post
iptables - Part 1
Next Post
SSSD and SUDOers