Is IP address by regex - Node.js Regular expression

Node.js examples for Regular expression:IP Address

Description

Is IP address by regex

Demo Code


     ip : {/*from   www. j ava 2  s .  c o m*/
          validator : function(value) { 
              return /^(?:(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/i.test(value); 
          }, 
     },

Related Tutorials