You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/02/07 06:21:46 UTC

DO NOT REPLY [Bug 6296] New: - RegularExpression not working with OR operator ('|')

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=6296>.
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=6296

RegularExpression not working with OR operator ('|') 

           Summary: RegularExpression not working with OR operator ('|')
           Product: Xerces2-J
           Version: 2.0.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: eddie@allette.com.au


I've resently tested the RegularExpression package to great extent and noticed 
that the '|' operator doesn't work. From what I can understand the '|' operator 
means a choice between the different groups. To illustrate I've used the 
following example:

String text = "dfdfdfdfdfdffddffdffdfffdfdfddfdfdffddfffd";
RegularExpression regExpChecker = new RegularExpression("ff|dd", "uw");
Match match = new Match();
if (regExpChecker.matches("", 0, text.length(), match)) {
    System.out.println("Got match");
}

Surely there are a couple of matches that fullfil the search condition but I 
don't get a match...

Cheers,
/Eddie

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org