Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Mar 2004
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unexpected Quantifier

    How can I RE-write this so I wont get the "Unexpected Quantifier" error

    Code:
           var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]\+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
    Fixed. A matter of writing another Pattern
    Last edited by Fuego; 05-25-2004 at 05:26 PM.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Are you really sure there is such an error?
    Doing a quick test (by pasting the code in the address bar and adding alert(filter.test('@')) produced no error.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    New Coder
    Join Date
    Mar 2004
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it has to do with the Jscript Engine...

    80 % of the browser no Problem..

    20 % do...

    It has to do with the Quantifiers... ie the *

  • #4
    New Coder
    Join Date
    Mar 2004
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Still nobody know how to edit this so that I wont get an "Unexpected Quantifier" error anymore?

  • #5
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Yes. Stop using lookaheads. Your problem lies in the lack of support for the /(?:pattern)/ lookahead in ie5.0w and ie5m.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •