The opposite of "A non-word character" (/\W/) is "No non-word characters" (!/\W/) or "all word characters" (/^\w*\z/). That's why /\w/ didn't work.
In reply to Re: Regex Problem
by ikegami
in thread Regex Problem
by nimdokk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |