[Bug] Regex11

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug] Regex11

Ladislav Lenart
Hi,

I have found the following bug in Regex:

    matcher :=
        RxMatcher
           forString: '[a]'
           ignoreCase: true.
    matcher matches: 'a'   "returns true"
    matcher matches: 'A'   "returns false but should be true because the
search is case insensitive"

The problem is that #matches: checks for 2 conditions:
    1) #matchesStreamPrefix: must return true
    2) stream must be at end
But the second condition is not true in the case of 'A'.
The problem might be in RxsCharSet>>enumerablePartPredicate because it
completely ignores the ignore case flag and the result set contains just $a.

I tried the newest version from the public repository, but the bug is
still there.

BTW I am using vw7.4 on Linux but I think this is not of much importance
in this case.

Has anybody a fix for this?

Thanks,

Ladislav Lenart