Of find/change GREP question

Salvation of the Italy,

I need to find each "2" in the words "CO2" and apply (only on the ' 2') index style.

I can't figure out how. If I search all the 2 at the end of a word I also find 2002 and O2, if I find (CO) (2) and replace it with $12 style index applies to the "CO2" not only "2"...

Can anyone help?

Luca

It's a classic: this forum for the shows "CO2 GREP" search this particular application is a good example of Advanced GREP trickery.

Short version: you want to search for it:

(?<>

Read http://forums.adobe.com/message/1285612#1285612 for the long version.

Tags: InDesign

Similar Questions

  • counting in a find change grep

    I have a script that runs several find change greps and alert how many each grep search were made.

    This is the code:

    See section function () {}

    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findGrepPreferences.findWhat = "the (section\\s +?). \\d+ ? [ \\.\\d+]?)";

    var changed = app.changeGrepPreferences.changeTo = "$1";

    Reference of the changed.appliedCharacterStyle = "cross";

    var changes1 = app.activeDocument.changeGrep ();

    If {(changes1.length = 1)

    Alert (changes1.length + "instance of 'the section' became 'article'.");

    } else {}

    Alert (changes1.length + "instances of 'the section' changed to 'section'.");

    }

    };

    No matter how many changes I know she took it returns 1.

    It also does not apply the character style to the entire reference. The character style is supposed to underline the Word section \d.

    He pointed out only half of the section of Word:

    section5

    Do not know what is happening.

    (1) make sure of course, you have the same name "cross references".

    (2) when checking a condition use double ==

    If (changes1.length == 1) {and NOT so {(changes1.length = 1)

  • Find/change Grep can't find one instance per paragraph, where wrong me?

    Hello

    I use a find/change Grep to find any price with a comma and change this comma to a thin space (the newspaper style).

    But the Grep considers only the first instance of this paragraph.

    Example of text...

    "$200 $200 000 000 $200,000."

    text at the beginning of paragraph $200,000

    $200,000 at the end of the paragraph text

    $200,000 tab. »

    In the sample, the grep would miss the second and third prize on the first line.

    I use...

    Find...

    (?<=\$) (\d{3})\,? ({\d{3})

    also tried (\$\d{3})\,? ({\d{3})

    Set up...

    $1 ~ <$ 2

    Is there anything I can add to find these last two prices?

    I use this in combination with script Batch find replace, so different greps are set up for 5, 6 and 7 digits starting by $.

    Thank you.

    Try this,

    (?<>

  • Problem with find/change GREP

    Hi, try to run by default find/replace InDesign AppleScript script to solve many formatting problems in a large document. One of them is occurences of a two-digit dollar figure followed by a comma (eg. "$ 10") that needs to be changed to have no comma.

    Use GREP I can pick it up by searching for "\$\d\d", but when I replace it with '\$\d\d' I get the string "\$\d\d". IE. "$ 10" becomes "\$\d\d" instead of "$ 10." I'm misunderstanding how works the part 'change' grep? Can someone advise?

    FYI the line in the search/replace support .txt doc is:

    grep{find what: "-\\d\\d$,"}{change to: "\\$\\d\\d"}{include notes: true, include master pages: true include hidden layers: true, any word: false}Remove commas after the price.

    .. What includes the extra backslashes to escape the backslash which are part of the GREP expression.

    Any help much appreciated!

    Thank you.

    On Grep Pallette, use below syntax to find two or more digit dollar figure followed by a text of commas,

    Search: (\$\d+),

    Change of: $1

    Vandy

  • Find format preferences in a script of find/change GREP?

    Hi all

    I create my first script to search/replace to run GREP queries several at once. But I am struggling to find how to specify the Format to find: preferably in the script that can be in the usual find/replace dialog box.

    Here is an example of a line in my script. What I want to achieve is for the line search for words/characters who currently have [standard paragraph] applied and then change the format of a paragraph style particular, I called "team name"...

    grep {findWhat: "(.+) ', appliedParagraphStyle: '[standard paragraph]'"} {changeTo: '$1', appliedParagraphStyle: 'The team name'} {} / / apply style name team

    BTW, I use the standard FindChangeByList script that comes with Indesign. Any help/comments are appreciated.

    See you soon,.

    Marco

    Instead of the name of the style, try the object of paragraph style:

    grep {findWhat: "(.+)", .paragraphStyles appliedParagraphStyle:app.documents [0] [1] ""} {changeTo: '$1', appliedParagraphStyle: 'new style'} {}

    Peter

  • Find/change the question numbers and create the Table of contents

    Hello! I need help to find all my item numbers and apply a paragraph style so I can use them to create a Table of contents page.

    The sample numbers

    #12345

    #12345-5

    #12345-20

    #12345-ABC

    #12345/N

    I tried to enter #^? ^ ? ^ ? ^ ? ^ ? in the search/replace and but it is exactly 5 characters after the sign #. I wonder if you can find all characters starting by # and up until the last characters.

    Once I found all item numbers, how can I apply the paragraph style to have these characters after the sign #? Because I only want to show item numbers without the # sign on the Table of contents/Index page.

    In addition, I have InDesign CS2, which have no function GREP maybe I can do this without the GREP?

    I really appreciate any help. Thank you very much.

    Are your numbers by themselves in a separate paragraph? OTHERWISE you can not USE the table of contents feature to list all the numbers.

    If are, then just look at # in find/replace, then set it to change formatting a new paragraph style (you must create this style in CS2) that you want to include in the table of contents, then as you say, you can use find/replace once more on the history of the TOC to remove the # of all numbers.

  • Find/change grep

    Hi all

    I need to insert a linebreak forced after the first comma in each paragraph. If the paragraph contains a comma, no problem but if theres more whether inserts all the af or the last (due to the nature of the grep).

    Is there a way to limit the grep for the opener?

    I tried the following:

    app.findGrepPreferences.findWhat = ' (. +?,)';

    app.changeGrepPreferences.changeTo = "$1\n";

    and

    app.findGrepPreferences.findWhat = ' (. +?,) (. +?) [, *])';

    app.changeGrepPreferences.changeTo = "$1\n$ 2 ';

    Hope we can nail; (o)

    --

    molsted

    Search: ^(.+?),

    Change of: $1, \n

    The circumflex accent ^ stands for 'start of paragraph' so he and the lazy operator (as you have already done) combine to restrict the GREP to the first comma only.

    Peter

  • Find/change grep allows you to delete repetitive titles?

    I am new to scripting grep, which saved me a lot of time with the French documents. I would like to delete repetitive titles.

    What I have:

    Education

    -University of Toronto, Toronto, Canada

    Extension to pharma building, 2010

    Role: Project Manager

    Education

    -Concordia University, Montreal, Canada

    Extension, 2009

    Role: Site Construction Manager

    Education

    -McGill University, Montreal, Canada

    Renovations, 1990

    Role: Designer

    What I would like to have:

    Education

    -University of Toronto, Toronto, Canada

    Extension to pharma building, 2010

    Role: Project Manager

    -Concordia University, Montreal, Canada

    Extension, 2009

    Role: Site Construction Manager

    -McGill University, Montreal, Canada

    Renovations, 1990

    Role: Designer

    Hello

    \n is not \r

    So 2 steps. Using like I told [#1 message]:

    + last regex:

    As I've already said, "quickly made operational, but still could be improved!

  • Security issues 'reset' does not appear when I try to change the questions

    I am trying to change my account email address, but I don't remember the answers to the questions. I tried to change the questions but it gives me the ability to reset my questions

    You must ask security team account Apple to reset your security questions. To contact them, click here and choose a method; If this page does not list one for your country or if you are unable to call, complete and submit this form.

    (142998)

  • A way to find my previous questions and problem reports?

    Is it possible on this forum to find my previous questions and problem reports? Since viewing a question earlier today, I found the greater PART of the answer and would like to add that I found the question, without waiting for someone else to answer. I can't remember the title I gave to the previous question, or I would use this title in the search for it.

    Information troubleshooting below is most relevant to a previous problem that this question.

    Contributions my link on main page of the forum should display a list of all your job offers.

    See the search in this forum for your username under "posed by".

  • I've forgotten the answer to my security questions and I can not change the questions because I need answers, so how can I fix it

    I forgot the answers to my security questions on my Apple ID and when I login to edit issues I can't because I need answers so, how can I get answers or change the questions?

    You have to ask Apple to reset your security questions. To do this, click here and choose a method; If this page does not list one for your country or if you are unable to call, complete and submit this form.


    (139255)

  • I can't change the questions to reset password also helps. In almost did not receive a letter with instructions

    I can't change the questions to reset password also helps. In almost did not receive a letter with instructions

    For a long time I don't remember creating answers to the questions that they tried to lose on the email I wrote not just the 2nd day.

    help solve the problem. I live in Ukraine. And there is no way to contact support.

    Hello! It is quite difficult to understand you.

    To reset the security questions, follow these steps:

    If you forgot the answers to your questions of security of Apple ID - Apple Support

    To have access to your forgotten Apple ID, follow these steps:

    If you have forgotten your Apple - Apple Support ID

    If you forgot your Apple ID - Apple Support password

    https://iforgot.Apple.com/appleid

    Also, take a look at this:

    On your Apple ID email addresses - Apple Support

  • Need help finding specific GREP for inDesign

    I hope that some experts check these types of questions.

    Unfortunately, the things I've tried don't work and I searched and searched the answer or the best place to get help.

    GREP QUESTION

    How to select a variable number of characters between two symbols, and also to select the symbols.

    EXAMPLE: one of them < three > four < 5 > six seven < 8 >

    I need to be able to get the < 3 > and < 5 > and < 8 > including the greater and less than symbols on each side - so I can delete them.

    Thank you

    Pixxxel,

    Don't forget: and

    <[\w\s-]+>

  • where can I find the creation of forum? and how to find my own questions in return?

    waar vind ik het first elements forum en hoe vind ik mijn eigen Internet questions back?

    where can I find the forum First of the elements? et How to find my own the questions asked back?

    Arkitsa wrote:

    Thank you 99jon, but it is always difficult to find your own questions return.

    Click on this:

    then this:

    and finally this:

    And your messages will be listed.

  • Find and replace grep Question.

    I'll put up paragraph styles and I'm changing anything with < CR > in a ^ p.  How do I do this with a string of grep?  I am wanting to add this string grep grep style in the paragraph styles.

    With GREP Styles you can not change the text, but the formatting of the text.
    You will need an action of find/replace with the TEXT or GREP find/replace.

    Uwe

Maybe you are looking for

  • remove the pop-up error dialog boxes

    Hi, I was wondering if there is a way to remove the error dialog boxes that are displayed when the type of interface commands. For example, I call the open TCP/IP command and if the port is not available with a stop of execution error, it throws a di

  • Small Business SERVER 2003 cannot send e-mail to some areas

    my client have an Exchange 2003 hosted locally on a SBS Server 2003. This exchange server already in production for more than 1 year and so far works great. until this Monday, found that it is not able to send e-mail to certain domains, emails are st

  • I can run streets & trips 2013 on 2 computers, I own?

    Then I load up streets and travel 2013 on my laptop and desktop PC?

  • Cannot access my eprint account

    Im trying to access my eprint account so I can add a new phone account (android) Of course, I forgot my password, but when I use the forgot my password button simply of freezes and do not send a password reset request. What I am doing wrong? is there

  • AirPrint works more on Photosmart 7510

    Since December, I have the 7510.  When I implemented AirPrint worked as a champion of the iPhone 4 and iPad 2.  Sometimes had to reset the connection on the devices, but otherwise, I loved.  Then all of a sudden it no longer works.  The printer works