...

View Full Version : Regex Problem



oralunal
08-31-2011, 10:58 PM
Hi,

I have a working regex on server side. But it doesn't work on client side.. JavaScript fails when I call this regex.. Can you correct my regex?


/(?i)\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z])(?<!togl\.me\/)(?!togl\.me)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?]))/


Thanks

Old Pedant
08-31-2011, 11:48 PM
I don't suppose you could tell us what it is supposed to do?

rnd me
09-01-2011, 12:37 AM
it's the raw extended unicode chars that are breaking your regexp. use ascii chars and escape codes.

Old Pedant
09-01-2011, 12:47 AM
Okay, I can see that. I copy/pasted into notepad so most of the unicode characters disappeared. Oops.

But I still don't know what it's supposed to do. My head hurts.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum