Actually we're escaping with another apostrophe, so JavaScript can handle any embedded apostrophes. I am not familiar with regular expression syntax at all, sort of inherited the project. I just know what was there, as far the regular expression goes, worked until we upgraded the server to Tomcat 5.
Karl -----Original Message----- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 1:25 PM To: Tag Libraries Users List Subject: RE: Issues with RegExp Tag Library and Tomcat 5 So, you're essentially trying to "escape" every \, ', and " character? This worked for me on TC 5.0.19: <%@ page contentType="text/plain" %> <%@ taglib prefix="rx" uri="http://jakarta.apache.org/taglibs/regexp-1.0" %> <rx:text id="text">\regular\ 'expression' "test"</rx:text> <rx:regexp id="rx">s/(\\|'|")/\\\$1/g</rx:regexp> <rx:substitute regexp="rx" text="text"/> Which produced: \\regular\\ \'expression\' \"test\" I changed \\$1 to \\\$1. Quoting Karl Coleman <[EMAIL PROTECTED]>: > It isn't a problem with the expression. It worked under Tomcat 4. But when we > upgraded to 5 it stopped working. Anyway, the expression is > s/(\\|'|")/\\$1/g. Since TOmcat 5 got installed, it is replacing apostrphes > with the string literal "$1", instead of another apostrophe. We are using > 1.0.1. > > Thanks, > Karl > > -----Original Message----- > From: Kris Schneider [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 04, 2004 9:35 AM > To: Tag Libraries Users List > Subject: RE: Issues with RegExp Tag Library and Tomcat 5 > > > Can you give some detail about what "aren't working" means? Are exceptions > being > thrown or are you just getting unexpected results? Are you using the latest > version of the tagilb (looks like 1.0.1)? Provide a simple example of a tag > that's not working. > > Quoting Karl Coleman <[EMAIL PROTECTED]>: > > > No one has any suggestions? I was told that the author of the regex taglib > > was on this list to at least say yes, no, maybe. > > > > Karl > > > > > -----Original Message----- > > > From: Karl Coleman > > > Sent: Tuesday, March 02, 2004 1:21 PM > > > To: '[EMAIL PROTECTED]' > > > Subject: Issues with RegExp Tag Library and Tomcat 5 > > > > > > Does anyone know of any issues with Tomcat 5 and the regexp tag library? > > Parts of expressions that worked on Tomcat4 aren't working since we > upgraded > > to 5. > > > > > > Thanks, > > > Karl > > -- > Kris Schneider <mailto:[EMAIL PROTECTED]> > D.O.Tech <http://www.dotech.com/> -- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]