carlosAlberto
IS-IT--Management
Hi all,
Having a few problems regarding the folowing pattern matching code:
var ipV4Pattern = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
var ipArray = IPvalue.match(ipV4Pattern);
if i have IPvalue equal to 3.3.3.3 or 4.4.4.4, it places the value of ipArray to 3.3.3.3,3,3,3,3 & 4.4.4.4,4,4,4,4
I'm puzzled... I think ipV4pattern is set up correctly. It should only accept valid IP addresses. ie. 1-255.1-255.1-255.1-255 (four octets of 1-255)
Thanks.
Having a few problems regarding the folowing pattern matching code:
var ipV4Pattern = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
var ipArray = IPvalue.match(ipV4Pattern);
if i have IPvalue equal to 3.3.3.3 or 4.4.4.4, it places the value of ipArray to 3.3.3.3,3,3,3,3 & 4.4.4.4,4,4,4,4
I'm puzzled... I think ipV4pattern is set up correctly. It should only accept valid IP addresses. ie. 1-255.1-255.1-255.1-255 (four octets of 1-255)
Thanks.