jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18515] - Line anchor does not work when match starts at index > 0
Date Sat, 25 Oct 2003 19:39:50 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18515>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18515

Line anchor does not work when match starts at index > 0





------- Additional Comments From son@sparc.spb.su  2003-10-25 19:39 -------
In this case jakarta-regexp behaves the same way as gnu-regexp library and 
Sun's java.util.regex.
It looks like they consider RE.match(int) (in jakarta&gnu) and Matcher.find(int)
(in java.util.regex) as a way to repeat search from some position
but not as search in substring.  Ans so, they do not match starting position as
line start.

I'd say this bug should be closed as not a bug.
BTW, there is a simple workaround:
use RE.match(string.substring(position)) instead of RE.match(string, position)
if you want match start of substring as start of line.

---------------------------------------------------------------------
To unsubscribe, e-mail: regexp-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: regexp-dev-help@jakarta.apache.org


Mime
View raw message