View Single Post
 
Old 06-24-2014, 09:41 AM
Ulodesk Ulodesk is offline Windows 7 64bit Office 2013
Word 2013 Expert Cert
 
Join Date: Sep 2009
Location: Virginia
Posts: 872
Ulodesk is on a distinguished road
Default Where is the error in my wildcard search?

In continued experimenting with wildcards, I set the following problem for myself:
Given this list,

Daryl Paer 2013
Fred Marker 240
Gary Kenda 23096
Joan Laer 23
John Jones 9012

find only the lines with 4-digit numbers. The replace would then put the number in front of the name, which should be, I think, \3 \1 \2^p. However, after many attempts, I am still not able to get the find argument to work properly. Here is the one that I think should work:

(*) (*) (<[0-9]{4}>)^13

The key, of course, is the third term. I thought this would find only the lines with four-digit numbers, but, although it finds Line 1, the subsequent clicks on Find next merely diminish the selected area by one character each time, from the left, for several, and then select the rest of the list as well! Adding parentheses around the ^13 makes no difference.

I don't understand the jump past the line return at the end of Line 1, to select the rest of the list, nor how to eliminate the one-character diminishment routine.

Who says the brain is just a computer? Not I, and thank goodness! But someone who has bridged the gap more successfully may surely help here.
Reply With Quote