I am using a simple regular expression (in C#) to find a whole word within a block of text.
The word may appear at the beginning, end or in the middle of a the text or sentence with in the text.
The expression I have been using \bword\b
has been working fine however if the word included a special character (that has been escaped) it no longer works. The boundary is essential so that we do not pick up words such as vb.net as a match for .net.
Two examples that fail are:
\bc\#\b
\b\.net\b
I can change the word boundary to a list of other checks such as not at the start non-space etc. however this is complex and can be slow if used on a large number of words.