What if you continue to match them, but not alter them if they are in your stoplist?
# assuming @stoplist my %stop; @stop{ @stoplist } = @stoplist; s/(\w+)/ ( $stop{$1} || ! defined $self->{$1}{val} ) ? $1 : $self->{$1}{val} /ge;
Might not be ultra-efficient, though.
In reply to Re: How to not match some words but match all the others
by fishbot_v2
in thread How to not match some words but match all the others
by set_uk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |