[ 
https://issues.apache.org/jira/browse/XERCESC-1390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Cantor resolved XERCESC-1390.
-----------------------------------
    Resolution: Fixed

> Regular expressions with unions do not work properly with replacing and 
> tokenizing.
> -----------------------------------------------------------------------------------
>
>                 Key: XERCESC-1390
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1390
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.6.0
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>            Priority: Critical
>             Fix For: 2.7.0
>
>         Attachments: patch.txt
>
>
> Consider the following regular expression:
> "(ab) | (a)"
> with the following input string:
> "abracadabra"
> If you use an instance the RegularExpression class to replace any matching 
> substrings with the empty string, the result should be the following string:
> "rcdr"
> Instead, just the last "a" in the string is replaced:
> "abracadabr"
> If you use the same RegularExpression instance to tokenize the expression, 
> the result should be the following set of strings:
> ""
> "r"
> "c"
> "d"
> "r"
> ""
> Instead, the result is
> "abracadabr"
> ""
> I will attach a proposed patch, but I don't know this code well, so it would 
> be great if someone could review it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org

Reply via email to