With jakarta-oro-2.0 it seems that using Perl5Compiler.MULTILINE_MASK does not have the same behaviour as Perl5Matcher.setMultiline(boolean). If I use MULTILINE_MASK it seems to ignore the fact that it has to treat '^' as the beginning of a line instead of the beginning of the string (I used \n): substitute regex: ^ substitute with: begin- result: begin-This is a multiline test. This is line two This is line three The behaviour using '$' is as expected: substitute regex: $ substitute with: -end result: This is a multiline test.-end This is line two-end This is line three-end If I use the setMultiline method the behaviour is as expected: substitute regex: ^ substitute with: begin- result: begin-This is a multiline test. begin-This is line two begin-This is line three substitute regex: $ substitute with: -end result: This is a multiline test.-end This is line two-end This is line three-end
This problem was fixed some time ago. The bug report was never closed because it was assigned to tcomcat-dev for some reason. The bug reporter should use the latest version of the software (2.0.3) to resolve the problem.
Closing bug as it was definitely fixed.