Never mind. It is important to remember that the Perl regexps are greedy: they will match as much as possible. Therefore to match a word, you only need to specify what a word is, there is no need to define what it's delimiters might be.
That simplifies the regexp to:
/([\w-]+)/g
In reply to Re: Re: Re: Regexp explanation
by matija
in thread Regexp explanation
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |