View Full Version : Unexpected Quantifier

05-24-2004, 10:16 AM
How can I RE-write this so I wont get the "Unexpected Quantifier" error

var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]\+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i

Fixed. A matter of writing another Pattern

05-24-2004, 10:42 AM
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.

05-24-2004, 10:50 AM
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 *

05-25-2004, 09:37 AM
Still nobody know how to edit this so that I wont get an "Unexpected Quantifier" error anymore?

05-25-2004, 11:51 AM
Yes. Stop using lookaheads. Your problem lies in the lack of support for the /(?:pattern)/ lookahead in ie5.0w and ie5m.