View Single Post
 
Old 07-05-2014, 06:52 AM
TechEd TechEd is offline Windows XP Office 2010 32bit
Novice
 
Join Date: May 2011
Posts: 16
TechEd is on a distinguished road
Default Why is this Find string not working

I am using the following string to find acronyms in reports.

.Text = "<[A-Z]{3" & strAcronym & "}>"

This line works fine and finds all uppercase groups of three or more letters, e.g. ABC, HELP, UNIFORM.
But, when I try the following code:

.Text = "<[A-Z]{3,4" & strAcronym & "}>"

which should find all instances of uppercase groups, but limited to three or four letters, it doesn't work and I get an error message.

Something I tried: If i use the Find and Replace dialog box and enter

<[A-Z]{3,4}>

It works

Any ideas ????
Reply With Quote