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 2121] - '.' or '-' in bracket expression gives unexpected results
Date Sat, 25 Oct 2003 19:40:06 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=2121>.
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=2121

'.' or '-' in bracket expression gives unexpected results





------- Additional Comments From son@sparc.spb.su  2003-10-25 19:40 -------
In current version (1.4-dev) only three regexps from list provided in this bug
produce results unexpected by submitter:
([a-z0-9-]+) matches "regexp" instead of "regexp-1"
([a-z0-9.-]+) - "{regexp" instead of "regexp-1.2"
([a-z0-9\\.-]+) - "{regexp" instead of "regexp-1.2"
The cause of this problem is that jakarta-regexp consider [-] as interval from
0 upto Character.MAX_VALUE.  And [a-] as interval from a upto 
Character.MAX_VALUE.

So, we can say that this is a feature and do not fix this.
Or say that this is a bug, but on this way we will have to change behavior of '-
'
when it is first/last character in [].
The advantage of latter approach is that jakarta-regexp will be more compatible
with Perl, gnu-regexp and Sun's regexp implementation (I think ORO too, but I 
don't have it to check).

---------------------------------------------------------------------
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