im looking for a regEx that allows whole IPs or just parts of an IP. I have build a regex that works but with a bug.
It wont allow "192" but "192.", so it expect a dot on the end of the first number sequence... "192.168" is allowed...
Have someone a RegEx that will do that? or can u show me where i have the failure in my regex???
Code: Select all
(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){1,3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?){0,1}I need the same stuff for a MAC Address. It should allow "-" and ":" seperators..?
I used the search function on this forum and i was looking at google, without success...! Please excuse my bad english...
THANK U!