carlosgarcianektan / urlrewritefilter

Automatically exported from code.google.com/p/urlrewritefilter
Other
0 stars 0 forks source link

condition regex doing find() instead of matches() #142

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 girts.ni...@specifit.com on 10 Jun 2013 at 8:12