Hey all,
Anyone have any ideas what i have done wrong in the code below? It works in all browsers but not Firefox.
Firefox keeps saying the following,
invalid regular expression flag w
The code….
// check for emails, then link emails
var eMail = UserMessage.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9..
var eMailLink = ‘<a href=”mailto:’+eMail+'”>’+eMail+'</a>’;
UserMessage = UserMessage.replace(eMail,eMailLink,UserMessage);
// check for urls, then link urls
var uRL = UserMessage.match(/([[url]http://._-]+[/url][a-zA-Z0-9.._-]+)/gi);
var uRLLink = ‘<a href=”‘+uRL+'” target=”
UserMessage = UserMessage.replace(uRL,uRLLink,UserMessage);
First to answer gets a beer, Cheers! :p
PS. If i really messed my code up, don’t blame me, im still learning!!