This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regex: Multi-char /i shouldnt match single char []
authorKarl Williamson <public@khwilliamson.com>
Wed, 15 Dec 2010 22:22:38 +0000 (15:22 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 15 Dec 2010 23:24:37 +0000 (16:24 -0700)
commit5a6441acb59053a086abbc64bfec4353a69aff0c
tree7bd4e046ae02b789ee8e42fbe122f8f0dd36b8f8
parentdaf3b8d4938645bc97bae0c97b089ea40463c913
regex: Multi-char /i shouldnt match single char []

":\N{LATIN SMALL LIGATURE ST}:" !~ /:[_st]:/i

because it is two character, but previously it did match.  The cause of
this is that the code was using swash_fetch() to test if the fold
matches.  But swash_fetch() only checks if the first character matches,
not all characters, so it was falsely returning true.

This is an intermediate commit, with some cleanup of blocks, comments,
and accompanying indentation of regexec.c to follow immediately.
regexec.c
t/uni/fold.t