urlrewritefilter icon indicating copy to clipboard operation
urlrewritefilter copied to clipboard

condition regex doing find() instead of matches()

Open GoogleCodeExporter opened this issue 10 years ago • 0 comments

The following does return a match using urlrewritefilter:
pattern=,?(nl|fr|en|de)+
input=du,be-ce;q=0.7,fr;q=0.4,en;q=0.3
indicating that find() is used, not matches() for condition regex'es

The code from Condition.java also seems to confirm
return evaluateBoolCondition(matcher, matcher.find());

It is very confusing to implement find() with EQUALS operator.
From documentation on EQUALS: "The operator to be used when the condition is 
run, the regular expression <b>matches</b> or the values are equal"


Original issue reported on code.google.com by [email protected] on 10 Jun 2013 at 8:12

GoogleCodeExporter avatar Jul 05 '15 22:07 GoogleCodeExporter