PDA

View Full Version : Regex Strings with Quotes



fuzzymonk
8 Mar 2007, 6:19 AM
It seems JSBuilder fails on a valid regular expression. I am trying to compress the Dav Glass YUI Addon Tools.js (http://blog.davglass.com/files/yui/docs/overview-summary-tools.js.html) and I get an unterminated string literal error from JSMin on the following line:


syntaxCheck: /^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/
(notice the odd number of double quotes)
-Chris

BTW, Jack thank you so much for yui-ext and the JS Builder tool -- they have been a huge help for me.