View Full Version : [FIXED-1444] [3.3.1] Invalid regular expression

6 Dec 2010, 10:54 AM
I'm trying to use ExtJS 3.3.1 with the latest Webkit nightly (to test using some new features in there) and I'm getting:

SyntaxError: Invalid regular expression: invalid range in character class

on line 680 of ext-all-debug.js, which is:

tagTokenRe = /^(#)?([\w-\*]+)/,

I have to admit I'm a little lost trying to figure out what that character class is trying to accomplish, but no other browser seems to have a problem with it.

Anyone bumped into this yet?

6 Dec 2010, 11:21 AM
That RegExp is indeed invalid.

It should be:

tagTokenRe = /^(#)?([\w\-\*]+)/,
or shorter:

tagTokenRe = /^(#)?([-\w\*]+)/,

(moving thread to Bugs)

7 Dec 2010, 3:31 PM
This is always a trap in regExp. I myself decided to escape "-" always, even if it's not needed at first/last position.

8 Dec 2010, 1:24 AM
This morning I encountered the same error with Google Chrome Canary Build (10.0.603.3) and an ExtJS 3.2-based app. I hope this regexp typo doesn't mean that all ExtJS apps will break in newer Chrome and Safari versions.

8 Dec 2010, 8:47 AM
XTemplate has the same problem

re : /\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,

9 Dec 2010, 8:16 AM
Looks like this is the original chrome bug:

But it appears both webkit and chrome reverted the changes.

10 Dec 2010, 12:30 AM
I'm a bit confused... So this should be fixed on Chromium or by ExtJs?

10 Dec 2010, 12:46 AM
Chromium reverted the change (I assume because too many applications broke).

But that doesn't mean that the RegExp is correct. It still needs to be fixed in Ext JS.

13 Dec 2010, 11:35 AM
This has been fixed in SVN for 3.3.2.

Ext JS 3.3.x branch revision 7312/7313
Ext Core 3.3.x branch revision 268/269

19 Dec 2010, 3:11 AM
I can't update extjs upto 3.3.2 version, for no commercial subscribers it no accessible?

Im update from http://code.google.com/p/extjs-public/


19 Dec 2010, 3:15 AM
I use Google Chrome 10.0.612.1 and my application on extjs don't work (((
So don't work and this site sencha.com, his js-part.