jrwinterburn
IS-IT--Management
Hi All,
I wonder if someone could help me with a regular expression query. I have a form in ASP.NET which currently has a field for IP address. I currently use a regualr expression to ensure that the user can only enter one IP address, and the regexp goes as such:
[0-9]{1,3}(.[0-9]{1,3}){3,3}
Now this works fine. However, I want to change this field so that the user can enter in either one or two IP addresses, separate by a comma, as such:
123.123.123.123
or:
123.123.123.123,456.456.456.456
I've tried a few variations but can't quite get it right. Any ideas would be appreciated.
Thanks
Jon
I wonder if someone could help me with a regular expression query. I have a form in ASP.NET which currently has a field for IP address. I currently use a regualr expression to ensure that the user can only enter one IP address, and the regexp goes as such:
[0-9]{1,3}(.[0-9]{1,3}){3,3}
Now this works fine. However, I want to change this field so that the user can enter in either one or two IP addresses, separate by a comma, as such:
123.123.123.123
or:
123.123.123.123,456.456.456.456
I've tried a few variations but can't quite get it right. Any ideas would be appreciated.
Thanks
Jon