m/\b$criteria\b/ - require a word break at each end of the text. Allows matches on 'SM and other stuff' or 'SM NP', but not on 'SMNP'.
In reply to Re: Regular Expression match too much
by GrandFather
in thread Regular Expression match too much
by enemyofthestate
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |