Skip navigation
omarjanak
Currently Being Moderated

How to use Find Change to add FC in front of all item numbers?

May 1, 2013 8:48 AM

Tags: #cs5 #find #indesign #change #imac #os #10.8.3

Hello,

 

I am using Indesign CS5 on iMac, running OS 10.8.3.

 

I designed a product catalog that has 148 pages. Now I need to save the same design and make a new catalog for our wholesalers. On the wholesalers catalog I need to change the item numbers and add FC in front of each item number. How can I use find change to find each item and change them with FC in front of the item numbers? The following are a few examples of the item numbers:

 

LED-4042 I want to change it to FCLED-4042

UA-42 I want to change it to FCUA-42

SC-110 change it to FCSC-110

KN-10 change it to FCKN-10

 

etc....

I am hoping there is a fast way to find and change these.  I was looking in to GREP, but I could not figure how to do this.

 

Thanks,

Omar

 
Replies
  • Currently Being Moderated
    May 1, 2013 10:24 AM   in reply to omarjanak

    If you are absolutely sure that all of your part numbers obey the pattern as in your examples -- one or more uppercase letters, a hyphen, one or more digits -- and no other "regular" text has this pattern, then GREP indeed is the answer.

     

    Find:

    \b\u+-\d+\b

     

    replace with:

     

    FC$0

     
    |
    Mark as:
  • Currently Being Moderated
    May 1, 2013 2:44 PM   in reply to omarjanak

    One way would be to just run it and then *remove* any double FC's -- but GREP can do even more! One of its many functions is to scan ahead for the presence or absence of certain text, and only act when it is (or it is not) there. This is called "lookbehind" (before the text you want to match) and "lookahead" (after the text you want to match).

     

    In this case, you want to find a phrase starting with capitals, but NOT the exact string "FC". That's a job for Negative Lookahead -- Only Match If Not.

     

    Try this: search for

     

    \b(?!FC)\u+-\d+\b

     

    ... the Replace With stays the same.

     
    |
    Mark as:
  • Currently Being Moderated
    May 2, 2013 9:00 AM   in reply to omarjanak

    I would just make a fresh copy of the old catalog and run the GREP sequence.  Just dump the one you have partially fixed.  That's what I would do.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points