View Single Post
 
Old 06-07-2012, 06:52 AM
tinfanide tinfanide is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

Quote:
Originally Posted by Colin Legg View Post
Hi,

Here's one pattern (a negative lookahead) which will exclude dog:
Code:
.Pattern = "(?!dog\b)\b\w+"
A lovely one. I missed the lookahead part when reading online tutorials of regexp.
But just wanna ask why
\b after dog is needed? To state the pattern ends by "dog" before the word boundary "\b"? And the \b outside before \w is used for what?
Reply With Quote