I use GREP to do this?

I created my OCD for my book very well. In my content, the positions of each chapter are drawn using the entries in the table of contents, and then followed by its page number.

I would like to add a word (the word "Chapter") before each entry materials in numbered. Can I use GREP styles to do this?

I'm using CS5.

Thank you!

And here: InDesign Automagic to work!

(There is a space after "Chapter").

Tags: InDesign

Similar Questions

  • Uppercase letters to lowercase using GREP. Is this possible?

    I try to understand, is it possible to create an all uppercase GREP to change code at the beginning of the paragraph in the style of the "bulleted list"?

    for example, I have this:

    Were he doth that winter

    • Confused in distill'd but;
    • leese devoid of hisoner work;
    • Life enough liquid sap without which the winter but hideous;
    • Will, doth their their it, beauty in. Beautiful Frost;
    • their same tyrants pent-up beauty will be substance;
    • Framework of substance even hideous nakedness

    Prisoner remain however

    • When winter leaves it beauty confuses;
    • Glass distillation then times;
    • Liquid unfair sap, altogether, the No.
    • Him for the one time enough left even this winter gone;
    • SAP, will, with gel;
    • A framework of their beauty Excel still but they doth will be where were which and;
    • For on with the left confuses;
      • And I want it to look like this:

        Were he doth that winter

        • confused in distill'd but;
        • leese devoid of hisoner work;
        • life enough liquid sap without which the winter but hideous;
        • will, doth their their computing, the beauty in. Beautiful Frost;
        • their same tyrants pent-up beauty will be substance;
        • framework of substance even hideous nakedness

        Prisoner remain however

        • When winter leaves it beauty confuses;
        • glass distillation then times;
        • Liquid unfair sap, altogether, the No.
        • him for the one time enough left even this winter gone;
        • PAHS, will, with gel;
        • a framework of their beauty Excel still but they doth will be where were which and;
        • for on with the left confuses;
          • I have raech to the next step...:

            Find/Change-GREP

            Search: ^ [[: upper:]]

            Find format: bulleted list (not finding the first letter in the topics)

            .. .and stuck. I don't know what to put in place? Help

            Thank you.

            N ° you don't want the caps-of-small-caps script. That will change your hats in small capitals.

            (1) copy the script to the post.

            2) paste into a text editor (or even better - the ExtendScript Toolkit).

            3) save it as plain text with a jsx extension.

            (4) to open the find grep dialog box and change you want.

            5) double-click the script.

            Substances

          • Use GREP to apply paragraph styles, character styles not only

            I have a body of text, and in it, I would like to apply a specific style to the paragraphs corresponding to a model. I did a GREP style that applied some changes formatting of paragraphs, I tried that it affects, but in doing so, I found that I couldn't Center these lines using a character style. (The corresponding lines should be centered, and the rest should be left aligned.)

            I was thrilled to learn that the GREP function, then completely disappointed with this limitation. InDesign offers the possibility to automate this, so I must not cross and Center each paragraph corresponding to the hand?

            Thank you!

            InDesign provides a way to automate this so?

            Yes and no. There is no dynamically linked paragraph styles to a paragraph about his boss, but he has at least two alternatives:

            (1) use Grep-F/C

            (2) use the script FindChangeByList or MultiFindChange which is basically automate operations F/C

            HTH

            Loïc

          • How to use GREP expression to group the last two words of a paragraph?

            Hi guys, I'm dealing with a document that is riddled with the orphan and want to use GREP to get rid of them all.

            I found this thread talking about how to group all the last 10 characters. But in my language, you can have up to 4 words together (almost a third of the sentence!) and still not break the limit of 10 characters. So if I use this expression, a sentence cut in half way, which make the whole paragraph looks horrible. I also tried the (\s\w+)? $ expression, but he left a few intact orphans (No. very random, model at all).

            So is there any other expression that can make the last 2 words of any paragraph together like glue stick?

            (\H+?\h ?) {2} $

            (^/)

          • Add commas to financial numbers using GREP

            Hi all!

            Using InDesign CC for this. This is the type of financial numbers that I do business with - $79605.01 - with more than 4 k that I add commas 1 or 2 according to the number. Final result should look like this - $79,605.01-

            So far, use GREP I in the FIND WHAT box \$[.,\d]+ and he tries to find them.  What am I missing or unable to, is what to put in the CHANGE TO box. I tried to \1$, but it does not work.

            I have need FIND WHAT already because what I have works well. I just need the script so that it will add commas to the appropriate locations. Search Google gave me a lot of answers on how to 'find' the numbers, but missing of course in the Department of "set up".

            No a kind soul help?

            Steph

            Your GREP expression returns the integer, which is not helpful in this case. I'm not all that an expert in complex GREP, but I don't see a way to do this only once with a number of variable length, so if you have cases for 1 and 2 required commas, I think you need two expressions and they need run in the correct order.

            (First of all find \d(?=\d{6}\.\d) and change to $0, which will add the comma to millions, then find \d(?=\d{3}\.\d) and change to $0, to add the comma for thousands. These expressions only work if there is a decimal number

          • Can I use GREP to transform every fourth tab back?

            I have a huge file with tabs plus 5,000, and only every fourth tab must be changed for a return. Is this possible using GREP or ANY OTHER METHOD and pressing back another me having to manually select each fourth tab?

            This screen is pulled before running GREP? You don't mention he had already returns after the names in some places.

            You need the * after all the [^ \t] elements, but avoids the. +. [^ \t] is a negative class, that means anything that is not a tab, and the * means 0 or more times.

            And you said every fourth tab, so it's actually the tab after the postal code, and which seems to do what you ask. If you want to change the tab after the name on the first line, I this would address differently.

            Find ^(.*?\t.*?) (\t) (?!\(\d{3}\)) which means find any character at the beginning of a paragraph (if there is) followed by a tab and more characters (if there are any), then a followed by three digits in parentheses DO NOT tab, and change $ 1 which should only change the tabs after the names. It is, however to change the tab after the postal code if the following line does not begin with three digits in brackets.

            Looking at the ads, are you sure you want to change this tab for a paragraph, rather than just a forced line break return (you can do by changing to $1\n)? It depends on how your styles are implemented...

          • Price of conversion using GREP

            In InDesign, it is possible to change the American classics price ($00.00) traditional French ($00.00) use GREP?

            I have hundreds of cases in a catalog where I need an easy way this conversion may.

            $0.00 $0.00

            $00.00 to $ 00.00

            $ 000.00 to $ 000.00

            In the hope of a solution.

            Thank you.

            To find

            (\$) (\d+)\. (\d+)

            Implement

            $2, $3 $ 1

          • Find the URL using GREP

            Hi all

            Request:

            I need to find the end of the URL with ".com", ".org", ".uk", etc. using GREP.

            for example,.

            [email protected]

            [email protected]

            rajjjesz.sir555@gmail. Corp.fr

            ()[email protected]()


            Please help for this request as soon as POSSIBLE.


            -----------------------------------------------------------------------------------

            But, I found the solution for the content to Start with "http" or "www."

            Using the Grep Code Forum is: (? I)(http|www) \S+ [\l\u|\d]

            Concerning

            Siraj



            Hi Siraj,

            Check it out now.

            var doc = app.activeDocument;

            app.findGrepPreferences = app.changeGrepPreferences = null;

            app.findGrepPreferences.findWhat = "[a-z0-9!" #$% &'* + / = ? ^ _'{|}] +(?:\ \. [a-z0-9!#$%&'*+/=?^_`{|}] +) * @(?: [a-z0-9] (?: [a - z0 - 9-] * [a-z0-9])? \.) + [a-z0-9](?:[a-z0-9-]*[a-z0-9])? « ;

            var found = doc.findGrep ();

            for (var i = 0; i)<>

            {

            Alert ([i] found. Happy)

            }

            Kind regards

            Cognet

          • Find the content after the last tab use GREP

            Hi all

            Is it possible to find the content after the last tab use GREP?

            Please see the screenshot below:

            Screenshot, I highlight the required text.

            Screen Shot 2014-05-27 at 5.11.29 PM.png

            Thanks in advance

            Siraj

            Hi Sriaj,

            Try to find this in Grep.

            \t[^\t\r]+$

            Kind regards

            Cognet

          • In a paragraph style, is it possible to automatically change a space in the area of district using GREP sty

            I create a menu template that will be used by my client. I'm using a font that has a very wide space between the two words. I can combined a quarter space instead of a regular space between words. This works for me, but won't work for the customer.

            If I create a paragraph style, is it possible to use GREP to automatically change the space in the area of district? and if so, what this text GREP would look like?

            Jump_Over, that did the trick! I'm just starting to learn more about the power of GREP in indesign and have still a long way to go.

            Thanks for your help!

          • Erase the numbers using GREP?

            Hi guys,.

            Could someone help me please? I only find GREP in inDesign if Im not that clued up on it. I searched the web, but can't seem to find a way to remove the numbers from sequntial a document - is it possible?

            I essentially several documents containing some old page numbers in parentheses - is possible to use GREP to search and delete, including the media? That is to say, [1], [2], [3], etc.

            Thank you!

            Hello

            [Of course, try this: \[\d+\]

            This will find any number of numbers in brackets, including the media.

            Hope that helps.

            --

            Marijan (tomaxxi)

            http://tomaxxi.com

          • Use Grep to add superscrpt style symbol character $

            I have a style of object which, among other things, apply a style of papragraph, in this paragraph style, I want to use GREP to find any instance of $, and apply a character style

            the problem I have is that it seems not recogize the symbol $

            In GREP, you must escape the symbol $ . Use: \$

            @+

            Marc

          • Use Grep to find/replace

            I'm trying to find how to use GREP in find/replace of chage the formatting of a text which is a spreadsheet.

            I worked on the GREP query "~ b (\d\d) ~ b ', which is a paragraph return, followed by two digits, followed by another paragraph of return

            and then it is replaced by ' \t $1 ~ b ', which is a tab, found two numbers and a paratrooper returned.

            What I have to do is change the query to search for ANY number of digits, (which may be delimited by commas: e.g. 23, 36, 48, 50), then replace with a tab + found text.

            I guess what I'm looking for is a way for the query find "any text between two paragraph returns, no matter what that length", but I don't know how to do this. All of the generic options seem to find a single exampler (a figure, a character etc.)

            And you came so far

            Repetition operators are? (zero or one), * (zero or more) and + (one or more times). You can also specify the exact number: {at least up to the}.

            All of these operators are "greedy" by default - they match as much as possible. To to match as less as possible (which I'm sure you will come, sooner or later), add another? After the expression of repeat.

            If this is a number, then possibly another (which will be always included):

            \D\d?

            and what a figure, then zero or as much as 9999999,93856 million:

            \D\d*

            which is functionally identical

            \d+

            And it is between 3 and 8 figures but will be forced to use the shortest possible match:

            \d{3,8}?

            Having said that: a quick & dirty solution for your real problem is to find any amount of numbers, spaces, and comma:

            ~ b [\d,] + ~ b

            (there are more here because otherwise it would correspond also to an empty line). The [..] a list of the hooks - it will match to any unique inside code.

            A more complicated but 'cleaner' way is looking very precisely that for many, comma, space, number sequences - it is cleaner because it lines poorly trained (comma without a space) is fried!

            (She also has another code - operators in parentheses. Look at their place in a good reference GREP - lost people are enthusiastic about Peter Kahrel O'Reilly title, because there on the use of GREP in InDesign.)

            ~b\d+(, \d+)*~b)

          • How to find a space using grep?

            Hello

            I tried several ways to find a space (SPACEBAR) at the beginning of a paragraph using grep. I can get to find any white space at the beginning of a paragraph, but not only a space (SPACEBAR) specifically? Anyone know how to find?

            Thank you

            Gary

            ↑ followed by a space. There is no special code for a single regular space.

            If you want to see where you have entered one or more spaces, use this code to enter a space character:

            \x{20}

          • Trying to get on my email, the following statement comes from the IPU: "we're sorry, but you must enable cookies and Javascript to use your username with this site. I click on "here", but nothing happens. How to enable the amd Javascript cookies?

            Try to get t my email, this happens: we're sorry, but you must enable cookies and Javascript to use your username with this site.
            How can I do this?

            George Szántó

            [email protected]

            see similar question answered https://support.mozilla.com/questions/836913

            To be notified of updates to a question, if this is your problem or not just click on the "Get email notifications" and follow made the choice. Only the original poster can mark it as resolved, so there should be a slight difference in choice as an original poster and where you lock on another issue. Notifications only apply to individuals the question where is entered.

          Maybe you are looking for