in reply to Regexp - exact matches

Without more to go on it is difficult to suggest much, but I think that you may be better served by the \b anchor than ^ and $.

From your snippit, it looks like you are concatenating several pieces of regex together before using them. This suggests that you could well end up with a regex that has several occurances of the ^ and $ anchors, which probably isn't what you want.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller