It already does do that.
Specifically, it always matches, setting $1 to foo if #\w+ is found at the start of the string, and setting $1 to undef otherwise.
In reply to Re^3: Simple Regex drives me insane
by ikegami
in thread Simple Regex drives me insane
by cheerydog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |