Results 1 to 5 of 5
Thread: Regex check hostname in a string
Dec 21, 2011, 13:48 #1
- Join Date
- May 2006
- 0 Post(s)
- 0 Thread(s)
Regex check hostname in a string
I've to check if a string contains the hostname
my 5 cents and it seems to work but not being at all
a regex guru .....
var re = new RegExp(window.location.hostname,'i'); alert(re.test(str));
and so on ....