Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any way to do this FAST? 1

Status
Not open for further replies.

uzapuca

Technical User
Dec 29, 2004
111
AR
Hi guys,

I want to replace in all the number of years that appears in a Bibliography Data in Adobe Garamond REGULAR to be inside parentheses. Here is the sample:

1999-2006

will be

(1999-2006)

How can that be done with GREP? Here is a sample of my text in the picture



By the way, is there any way to tell GREP, not to put into parenthesis the years that are in ITALICS (green color)?


Any idea?


Thanks for any info!

Cheers,
Sebastian
 
Find

(\d\d\d\d)\-(\d\d\d\d)

Change to

($1)-($2)

That's providing there are no spaces between the hyphen and the numbers

If there are then first search for

(\d\d\d\d)\s+\-

Change to

$1-

And do a search for

\-\s+(\d\d\d\d)

Change to

-$1

Then do the first search



 
Hi Eugene,

Great help! I will try it right away.

Cheers,
Sebastian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top