A word boundary (\b ) is a spot between two characters that has a \w on one side of it and a \W on the other side of it (in either order), counting the imaginary characters off the beginning and end of the string as matching a \W .
This means \$AVG will never match /\b\$AVG/ because there is no word boundary between a backslash (\W) and a dollar sign (\W).
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re: regex not matching special char
by kennethk
in thread regex not matching special char
by mnooning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |