Web Analytics Made Easy -
StatCounter Regex Problem - CodingForum

Announcement

Collapse
No announcement yet.

Regex Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Regex Problem

    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?

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

  • #2
    I don't suppose you could tell us what it is supposed to do?
    Be yourself. No one else is as qualified.

    Comment


    • #3
      it's the raw extended unicode chars that are breaking your regexp. use ascii chars and escape codes.
      Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com

      Comment


      • #4
        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.
        Be yourself. No one else is as qualified.

        Comment

        Working...
        X