susanahernandezd
12/9/2016 - 8:38 AM

search_in_string.js

var str = "Visit W3Schools!"; 
var n = str.search("W3Schools");

//returns de position of the match, form 0 to ... If returns -1 means that there is no match