I have been through the documentation for Spring Expression Language and I saw that it has operator matches for regular expression. Does anyone know if the algorithm used for it is the same greedy one as for matches in Java language?
Asked
Active
Viewed 1,561 times
1 Answers
2
It uses the basic Java implementation - see OperatorMatches
...
Pattern pattern = Pattern.compile((String) right);
Matcher matcher = pattern.matcher((String) left);
return BooleanTypedValue.forValue(matcher.matches());

Gary Russell
- 166,535
- 14
- 146
- 179
-
It should have cache the pattern rather than compiling it everytime. – Changgeng Jan 09 '15 at 00:59