I was trying to use Tomcat SSI filter: http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html While it generally works, I have discovered that SSI regular expressions are not supported. As much as I can see from tomcat source code, this feature is just not implemented. For example, those expressions always return "did not match": <!--#if expr="abc = /abc/" -->matches<!--#else -->did not match<!--#endif --> <!--#if expr="abc = /[a-z]/" -->matches<!--#else -->did not match<!--#endif --> This bug is a showstopper for me, because in my application I need SSI regular expressions support.
Patches for enhancement requests are always welcome
Fixed in 7.0.x and will be included in 7.0.17 onwards. I don't see this being back-ported to 6.0.x or 5.5.x.
Hi, I found a bug working with Tomcat, SSI and regular expression that is still unresolved and my work is essential for proper operation: For example: <!--#set var="aux" value="aa12" --> <!--#if expr="$aux=/^aa([a-zA-Z0-9\-_]*)/" --> <!--#set var="aux2" value="$1" --> <!--#endif --> Resulting value:<!--#echo var="aux2" --> In a html file works correctly, but when working on Tomcat, a complex regular expression fails, and the page returns nothing from it. Regards and await your response.
(In reply to comment #3) > Hi, I found a bug working with Tomcat, SSI and regular expression that is > still unresolved and my work is essential for proper operation: I do not understand your description. What do you mean by "fails" and what do you mean by "returns nothing"? Please provide: 1. What are the steps to reproduce your problem 2. What is the actual behaviour that you are observing. 3. What do you expect the correct behaviour to be. ======================================= By the way: 1. The actual implementation Regexp matching is in org/apache/catalina/ssi/ExpressionParseTree.java, in method compareBranches() 2. The feature was implemented by r1136231 and r1136399 3. r1136399 was result of discussion in "Re: r1136231" thread on dev@. In archives: http://markmail.org/message/g6ba77x7abkhibnn http://marc.info/?t=130817798400003&r=1&w=2 4. If you can provide a patch for ExpressionParseTree#compareBranches(), it would be faster.
(In reply to comment #3) I think I understood what you are asking for. It is a separate issue, so I filed it separately -> bug 53387 I am re-closing this issue as FIXED.