Hi all,
I am trying to validate a twitter url, so that at least it contains a username. I do not care if it exists or not, just that there is one.
I am using the below javascript regex
var re = new RegExp('((http://)|(www\.))twitter\.com/(\w+)');
alert(re.test('http://twitter.com/test_user'));
but it is not working.
The strange thing is that I created and tested the above regex at this URL
http://www.regular-expressions.info/javascriptexample.html
where it works just fine.
Any ideas?
Thanks