Bug 125 - jakarta-oro (Perl5) regexp classes: MULTILINE_MASK seems to ignore multiline ^ BugRat Report#134
Summary: jakarta-oro (Perl5) regexp classes: MULTILINE_MASK seems to ignore multiline ...
Status: CLOSED FIXED
Alias: None
Product: ORO
Classification: Unclassified
Component: Main (show other bugs)
Version: Unknown
Hardware: All All
: P1 normal (vote)
Target Milestone: ---
Assignee: Jakarta Notifications Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-09-18 15:15 UTC by JMB
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomcat Developers Mailing List 2000-09-18 15:15:58 UTC
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

Comment 1 Daniel F. Savarese 2001-06-08 13:57:26 UTC
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.
Comment 2 Daniel F. Savarese 2001-06-08 13:58:34 UTC
Closing bug as it was definitely fixed.