japhy has asked for the wisdom of the Perl Monks concerning the following question:

If anyone here uses Unicode Character Classes (they're things like \p{InThisLanguage} used in regexes) and creates their own, I have a patch I'd like stress-tested.

Go to http://japhy.perlmonk.org/patches/unicode/ and apply the patches to utf8_heavy.pl and perlunicode.pod (the first is the actual code patch, the second is merely its documentation). Then, test it. It allows you to build complex Unicode classes based on others you create (much like set theory).

If you don't understand it, don't bother. It's for a select few (and I'm not even one of the people who uses it).

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Anyone use Unicode Character Classes?
by TimToady (Parson) on Apr 13, 2004 at 18:09 UTC
    Um. Slight doc problem. The intersection of hiragana and katakana would be the null set...

    But making user definitions per-package is good.

      Damn. I didn't know that. I'll make a replacement for that then.
      _____________________________________________________
      Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
      s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
Re: Anyone use Unicode Character Classes?
by ambrus (Abbot) on Apr 13, 2004 at 17:50 UTC

    It is nowdays a fashion to make evrything turing-complete. Gdb has if and while commands. Dc was here for ages now. I see tiny universal languages evrywhere. Soon, we'll have turing-complete character classes too.

    (Compare (?{ }))