I'm looking for a Regex (using .NET) to match the word ass. The Regex shouldn't match words like assignment.
How can I do this?
I'm looking for a Regex (using .NET) to match the word ass. The Regex shouldn't match words like assignment.
How can I do this?
You are looking for word boundaries (\b):
\bass\b
This will match ass but not bass or assignment.
How about \bass\b ? This uses word boundaries to limit it to the single word.