You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Loenko (JIRA)" <ji...@apache.org> on 2006/04/19 10:24:24 UTC

[jira] Resolved: (HARMONY-350) HARMONY-39 Regular expressions does not match backreferences during find.

     [ http://issues.apache.org/jira/browse/HARMONY-350?page=all ]
     
Mikhail Loenko resolved HARMONY-350:
------------------------------------

    Resolution: Fixed

fixed in revision 395158
Nikolay, please verify that it fully resolves the problem

> HARMONY-39 Regular expressions does not match backreferences during find.
> -------------------------------------------------------------------------
>
>          Key: HARMONY-350
>          URL: http://issues.apache.org/jira/browse/HARMONY-350
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>  Environment: All
>     Reporter: Nikolay Kuznetsov
>     Assignee: Mikhail Loenko
>     Priority: Minor
>  Attachments: groups.diff, groups2.diff
>
> For the optimization purposes match and find methods of HARMONY-39 regex works differently. One of the differences that cause some problems is that group boundaries are being set in different time (onward, in case of match and on the way back in the case of find). Thus back references "\1-9" won't work as expected in case of find method (because in case of find boundaries are not yet set when back reference appears). The same problem appears if pattern contains ".*", where we try to simulate find and face the same problem.
> While fixing this problem the following simple issues was also found and fixed:
> - Empty constructs are not being processed correctly. The examples of this construct are empty group(i.e. "()"), or empty alternation(i.e. "|") and combinations with embedded flags, which do not match actual characters. In all cases HARMONY-39 engine throws PatternSyntaxException instead of returning token representing empty construct.
> - Boundaries where embedded flags are in effect are not correctly processed:
>       - Whitespaces being ignored after group which nested comment flag;
>       - Global embedded flags do not mix with local once;
>       - Minus sign in embedded flags automatically removes case insensitive flag;
> The attached patch will address all mentioned above broblems.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira