Wondering if someone might know a easy way to grep both the IP and IP in CIDR form in one go
Expected Output:
78.0.0.0/8
136.144.199.198
Current Output:
78.0.0.0
136.144.199.198
This is my current regex:
grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\/[0-9]\{1,\}'
This looked like it could work but seems to be only for perl
^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$