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 15455] New: - RE unable to match a + character as part of character class
Date Tue, 17 Dec 2002 20:59:28 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=15455>.
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=15455

RE unable to match a + character as part of character class

           Summary: RE unable to match a + character as part of character
                    class
           Product: Regexp
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other
        AssignedTo: regexp-dev@jakarta.apache.org
        ReportedBy: calvin.goodrich@oracle.com


The RE object is unable to match a '+' character when it is part of a 
character class, i.e. [\+\-\*\/\%]. It is able to match '-', '*', '/', and '%' 
just fine. It's even broken when the + is specified as an hex char, as in 
[\x2B\x2D\x2A\x2F\x25], whereas the other characters still match.

Tested against JDK v1.3.1_01 and JDK v1.4.1_01 on the Windows platform.

Test JSP code follows:

<%@ page import="org.apache.regexp.*"%>
<%
  String formula = "1 + 1";
  RE re = new RE ("([\\+\\-\\*\\/\\%])");
  if (re.match (formula)) {
%>
expression matched '<%= re.getParen (1) %>'
<%
  }
%>

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


Mime
View raw message