On Thursday 14 June 2001 07:10 am, Bart Lateur wrote:
> If you're saying that the perl core shsould include hooks into the regex
> engine for custom character classes, I agree. But nothing more.
> Currently, Perl5 provides a hook for "use locale;", but I wish there was
> something more general than this, more customizable. For example, I
> sometimes have user defined character encodings, that don't follow any
> standard. I wish there was a simple, perl-only, way to cope with them.
>
> Also, for example, I would like be able to match "á" with /[a]/, but
> without changing the sort order. "locale" is a bit too much "all or
> nothing" for me.

That would probably be another good use for literal overriding.

use re 'literal a => [aàáâãä]';

my $foo = "abàcádãe";
print $foo =~ /a.a/g;    # abàádã
print $foo =~ /[a].[a]/g;   # Nothing.  Character classes not affected


-- 
Bryan C. Warnock
[EMAIL PROTECTED]

Reply via email to