in reply to Re: Substitute \W but not \.
in thread Substitute \W but not \.

Are you sure? perlunicode says
(However, and as a limitation of the current implementation, using "\w" or "\W" inside a "[...]" character class will still match with byte semantics.)
which means that [^\w] is not the same as \W.

Replies are listed 'Best First'.
Re^3: Substitute \W but not \.
by merlyn (Sage) on Mar 13, 2008 at 15:37 UTC
    Well, logically, those are arguably the same (at least, have been since day two), so I'd call the current implementation "buggy" if it can't make those the same.

    But thanks, I was unaware of this bug.