m = re.findall("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}",s)
How do I modify it so it will match not only IPv4, but also something with CIDR like 10.10.10.0/24
?
(?:\d{1,3}\.){3}\d{1,3}(?:/\d\d?)?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With