This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Cari Bantuan

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Pelajari Lebih Lanjut

regular expression too complex on my site (i'm using extjs) works on previous firefox, newest IE, Opera etc

  • 12 balas
  • 152 memiliki masalah ini
  • 1 kunjungan
  • Balasan terakhir oleh vamshikaley

more options

cant load page on site using full extjs. usually works on previous firefox, latest IE, Opera etc

cant load page on site using full extjs. usually works on previous firefox, latest IE, Opera etc

Semua Balasan (12)

more options

i found that that the problem was caused by too large scripts. my script around 8000 lines. i reduced half of script and it works fine. does firefox 4 limited dom max something value? should i divide my script into parts or something? strange thing is my scripts works on all previous firefox versions, IE, Safari and Opera. any advice from expert? maybe my problem related with this https://bugzilla.mozilla.org/show_bug.cgi?id=587439

more options

I do have the exact same problem since Firefox 4 (Mac OS). I'm also working with ExtJS - but I don't have the possibility to shorten the script..

more options

you dont have to shorten the scripts just make your script more modular. i tried many options to make my application run on FF4 but the solution i found so far is make my scripts under 5000 lines. i have to rebuild my script, create functions and reuse forms also use autoload for some scripts that i put on other files. i've create 4 applications using extjs so far but only on one form contain 8000 lines comes regular expression too complex error..

but lets hope FF4 make some changes so we dont have to recreate codes.. :-)

more options

beryhood, as you said, I hope FF solve the problem. We developed an application in extjs 3.1 with lots of files. Rewrite all the files that have more than 8000 lines will be a lot of work. It works fine in FF 3.6 in Ubuntu and Windows.

more options

I've got the same problem with an ERP system developped in ExtJS. My users can't use FF4 in this case and i can't redevelopp all my code...

Do u have a solution for it ?

more options

i have suffer this kind of error too.. i'm using ExtJS 3.3.0, in my case, my script is not more than 200 lines, but i have at least 1500 records for Ext.store... if i limit the records for 1400, then it work like a charm...

please help for this issue... :)

more options

I have this problem however I am not using extjs. I have a whole bunch of javascript code. Then I load Datatables jQuery plugin, then I load several hundreds of records. If I only show a few records it works, but this completely ruins the functionality of my application. Until Firefox allows a larger DOM, or whatever the problem is I will have to block FireFox 4 from using the site. Please fix this.

more options

I had this problem, too. My regex tested okay in online validators, but failed when I put it in a .js file. I figured there must be some difference in the way the regex is created from the contents of the textarea in the online validator, and the way it was fed to the new RegEx() function in my script. So... (what a kludge...) I put a hidden textarea on my pages that needed regex validation, and grab the value of the textarea to feed the function. Voila. Works without a problem.
For those of you with deep knowldege about such things: what is the difference between a string literal created by putting the characters between quote delimiters (as one would do in creating a string in javascript) and the way a string is created when the text value of a screen control is retrieved by a reference to the DOM? That seems to be the only difference I can find.

For the curious, the regex I was trying to create (and which works in a validator or hidden textarea field) was for validating URLs.
The text area definition, with the regex is:
<textarea id="pattern" style="display:none;">^(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&amp;%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&amp;%\$#\=~_\-]+))*$</textarea>

Hope this helps someone...

Diperbarui oleh cor-el pada

more options

I had experience the same problem with firefox 4 and jquery 1.3.2. My application load some data as html snippet via ajax. My application will not load on firefox 4.0 but load in IE 8 and IE 9. Firefox 4.0 will only work when i reduce the data size of the html snippet. Does anyone had any solution to this firefox 4.0 problem?

more options

I posted a question to stackoverflow before i realized it was this bug. you can see a lot more detail about my experience there: Firefox Error Parsing JSON with Large String

more options

Did you ever find a solution? I'm having the same issue "Regular Expression too complex" with Firefox 5.0 on both PC and Mac using jquery 1.3.2.

Any help would be much appreciated.

more options

I had experience the same problem with firefox 4 and JavaScript file, it reports the regular expression is too complex in the error console. My application loads JavaScript file which contains the regular expressions. My application will not load on firefox 4.0 but load in IE 8 and IE 9 and earlier versions of Firefox. Firefox 4.0 will only work when some Regular expressions within the file are modified or when the Regular expressions are removed altogether. For me it worked when i changed the regular expressions containing expression {n,m} to * (star/asterisk). Example: problematic regular expression : /(^(\{lang=(.|\r|\n)+\})?(.|\r|\n){0,4000}(\[,\](\{lang=(.|\r|\n)+\})?(.|\r|\n){0,4000})'{0,9}'$)/g; Workaround : /(^(\{lang=(.|\r|\n)+\})?(.|\r|\n){0,4000}(\[,\](\{lang=(.|\r|\n)+\})?(.|\r|\n){0,4000})*$)/g;