in reply to variables in regex character classes

<much handwaving> If you want to match ANY of the characters in $BEL_LETTERS, and $next_word is a literal string (and not a "true regex" which should be interpreted with meta characters like *) you should probably do something like

my $BEL_LETTERS = qr/[ABVHD]*/;
and
s/\b(\Q$next_word\E$BEL_LETTERS)\b/>$1</gi);
</much handwaving> Good luck :-)