I have regex that matches words fine except if they contain a special character such as
~Query which is the name of a member of a C++ class.
Need to use word boundary as shown below for member names that are single characters.
$key =~ /\b$match\b/
I tried numerous expressions I thought would work such as /[~]*\b$match\b/
or /\b[~]*$match\b/
Is it possible to put a word boundary on words that may contain a special character?