Hi,..simple questions I think
I am trying to search for the occurrence of a string in another string using regex in javascript like so:
var content ="Hi, I like your Apartment. Could we schedule a viewing? My phone number is: ";
var gent = new RegExp("I like your Apartment. Could we schedule a viewing? My", "g");
if(content.search(gent) != -1){
alert('worked');
}
This doesn't work because of the "?" character....i tried esaping it with "\" but the doesn't work either.....is there another way to use "?" literally instead of as a special character?
Thanks, Andrew