I need to write a script that prints out a statement stating whether an IP is valid or invalid.
IP addresses are made up of four bytes (each with a valid range of 0-255).
valid examples: 127.0.0.1 , 123.244.100.1 , etc.
invalid examples: 124,44,2,2 , 127.0.2,4 , 355.23.24.43 , etc.
I'm guessing the easiest way would be to use regex? but i am having some trouble with that.
I also thought about using split(), but im not sure how I would handle any other special characters that aren't a "."
Any help or advice would be great, thanks