Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 06-07-2012, 06:52 AM
tinfanide tinfanide is offline VBScript.RegExp: exclude a particular word Windows 7 64bit VBScript.RegExp: exclude a particular word Office 2010 32bit
Expert
VBScript.RegExp: exclude a particular word
 
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
.doc Suddenly Changed to .vbe (VBScript Encoded Script File) emes Word 2 04-24-2012 05:07 PM
VBScript.RegExp: exclude a particular word WORD: Rtf and search-replace (regexp/fonts) seteshpl Word 1 09-06-2011 01:35 AM
Edit spell check dic to exclude words? franklekens Word 1 07-03-2010 09:57 AM
VbScript to Print a .pdf DaveB Excel 2 03-07-2009 12:36 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft