develooper Front page | perl.perl5.porters | Postings from April 2010

fold case matching

Thread Next
From:
Dave Mitchell
Date:
April 27, 2010 09:17
Subject:
fold case matching
Message ID:
20100427161718.GN9972@iabyn.com
Just out of curiosity, which perl (if any) is doing the Right Thing
as regards the following code, which matches a char that case folds to two
chars:

    # lc("\x{149}") => "\x{2bc}N"

    print "ok PLAIN 1\n" if "\x{149}" =~ /\x{2bc}/i;
    print "ok PLAIN 2\n" if "\x{149}" =~ /N/i;
    print "ok PLAIN 3\n" if "\x{149}" =~ /\x{2bc}N/i;

    print "ok ALT   1\n" if "\x{149}" =~ /\x{2bc}|ZZZZ/i;
    print "ok ALT   2\n" if "\x{149}" =~ /N|ZZZZ/i;
    print "ok ALT   3\n" if "\x{149}" =~ /\x{2bc}N|ZZZZ/i;


5.8.0,
5.13.0,
blead:

    ok PLAIN 3
    ok ALT   1
    ok ALT   3

5.10.0,
5.10.1,
5.12.0:

    ok PLAIN 1
    ok PLAIN 3
    ok ALT   1
    ok ALT   3

(This is in the context me me trying to understand and fix the trie code
for [perl #74484] Regex causing exponential runtime+mem usage.)



-- 
"You're so sadly neglected, and often ignored.
A poor second to Belgium, When going abroad."
    -- Monty Python, "Finland"

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About