Author: IanBlack | Posted on: 7/20/2010 3:35:52 PM | Views : 471

Hi there,
I'm trying to get a regular expression working that will match specific whole words.
So far I've got \bkeyword\b which is nearly perfect, however, it's not quite working as I would like.
If regex.isMatch("This is an #example sentence", String.Format("\b{0}\b","example")) Then End If
So the problem here is that in the sentence the word example has a # in front of it and so shouldn't be matched but it is.
Is there a way to modify this regular expression so that it won't match but if I do search for "#example" it will.
Any help is greatly appreciated - I've been at this for hours and haven't had much luck yet.
Many thanks,
Ian.
...

Go to the complete details ...