lundi 23 février 2015

Regular to find string include IP address - javascript [on hold]

I would like to find string that include IP address inside in javaScript, I need the all the string not only the IP.


example for string: "accesslogs_100.74.196.29_20150210"


I try this one:



str.match(/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/)


Thanks, Cfir.


Aucun commentaire:

Enregistrer un commentaire