http://www.perlmonks.org?node_id=556825


in reply to Re^3: Best practice or cargo cult?
in thread Best practice or cargo cult?

\N{...} is already a recognized pattern in perl5 regexp language. Pick something else and add it to your current perl using the instructions at Extending Regular Expression Syntax. It's a presentation I gave to Minneapolis.pm last year. Or... co-opt \N for your own use. It isn't as if \N is so common that you'd miss it if you stole it away from perl. In my demo I redefined \w and \b to something more appropriate for my own set of common tasks.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Replies are listed 'Best First'.
Re^5: Best practice or cargo cult?
by demerphq (Chancellor) on Jun 22, 2006 at 07:38 UTC

    Actually, ive been mulling adding some support for some special regnodes for a while. For instance more than once ive been asked for a proper fail regop. And actually I made that comment offhand, if I had remembered that \N{} is already used I would have suggested something else. Any recommendations?

    ---
    $world=~s/war/peace/g