Self-propagating ampersands in GREP in a paragraph style

Hello. I use GREPs in paragraph styles (InDesign CS6) the color of specific words and struck a strange thing, when the words I'm trying to color include an ampersand (&).

The style works fine the first time, but if I call the paragraph style, and extra sales begins to appear in the GREP expression, not only to the expression, I am changing, but other expressions that include an ampersand as well.

Example: I enter track ^(?i)------& field

The next time I have change a grep in this style, the grep goes to the track to ^(?i)------& & field. ^(? (I) then track------& & & field.

If I go out the extra mostapha, only to see them back. And have a space or not having not spaces on each side of the ampersand does not work

impact on the problem. I tried to use \s instead of space, but it makes no difference. I also tried dumping my InDesign preferences and export the document as a file .idml in an effort to clear all funky.

ampersand1.jpgampersand2.jpg

Has anyone seen this? Thank you!

Kelly

Sorry, I have never seen it before.

A vague assumption: many styles with Grep?

But maybe you try this instead:

(? i) a\x e {26}

Tags: InDesign

Similar Questions

  • 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

  • GREP find the paragraph style

    Hi guys,.

    I use this grep to search for all words that use the body text paragraph style.

    However, I get the same result if I specify a paragraph style to find or not.

    The result is always the same. Why is this?

    app.findGrepPreferences = null;

    var found = app.findGrepPreferences.findWhat = "\\b\\w+?\\b";

    found.appliedParagraphStyle = "Body text";

    Found = App.activeDocument.findGrep ();

    Alert ("this document has" + found.length + "words");

    gives the same result as

    app.findGrepPreferences = null;

    var found = app.findGrepPreferences.findWhat = "\\b\\w+?\\b";

    Found = App.activeDocument.findGrep ();

    Alert ("this document has" + found.length + "words");

    app.findGrepPreferences=null;
    var found = app.findGrepPreferences.findWhat="\\b\\w+?\\b";
    app.findGrepPreferences.appliedParagraphStyle=app.activeDocument.paragraphStyleGroups.item("body").paragraphStyles.item("Body text");
    found=app.activeDocument.findGrep();
    alert("This document has "+found.length+" words");
    

    (^/)

  • GREP find/replace + paragraph Styles

    Hello

    I'm editing a long document and have benefited from the assistance of the community already, but being new GREP Style, find/replace, I need to ask for additional help.

    Below a screenshot of the script (original). Two blocks of text you see anticipated by the icons have have styles of different paragraphs. Icons are placed like custom glyphs.

    Now, the last line with C2, 9, 14,... is the target of this post. They are buses of London and I created a paragraph with another icon. The copy that I work with unfortunately is as you see. Buses will follow «;»

    Resulting to place a \r after the semicolon and assign the new paragraph style. The item to work with is (probably) the last "," before the registration of the bus. All entries have it in the same way, where a search/replace global grep should work fine.

    My attempts:

    I used of a previous debate (? < =------;)) [^ ;] + $ to match everything from the end until the last semicolon, but then I found the problem preserving the matched characters and placing \r (using the (? < =-;). start at the beginning and stops at each point comma + space)

    So question: how to stop at the first semicolon at the end and replace the space with \r to create a new paragraph?

    Then, it is two question :-)

    From my previous attempts, I noticed that when you replace the semicolon + space with \r, and change the style of paragraph at a time (from Rail to Bus) caused the Rail paragraph style change (logic) to the style of Bus. So I tried to say the paragraph style of the track "Following paragraph Style is style of Bus" (and not to change the paragraph style in find/replace), but in a way that no longer works.

    Second question is: given to split the find/replace in two steps, how then transform / apply to newly created paragraph the correct style of Bus?

    Thank you in advance for your valuable assistance. So far, the community has been great!

    Antonio

    Original

    Screen Shot 2016-07-12 at 22.32.23.png

    Result for

    Screen Shot 2016-07-12 at 22.54.51.png

    Hi Antonio,.

    If I understand correctly, in 2 regex [1 click play with Multi/find-replace our friend Martinho da Gloria]:

  • I can target fat with GREP - in dialog paragraph styles?

    Hello.

    I have a number of paragraphs which are mainly "regular" (as the font style: ordinary) but they also have a few bold throughout.

    I'm doing a paragraph style that will apply a character style to text bold using GREP.

    Is there a GREP code for this (to not apply the character for the "BOLD" style and nothing else)?

    I know it's easy to do in the Find/Replace dialog box, but I wonder about the paragraph style dialog box in the GREP section.

    Any help would be greatly appreciated.

    Hello

    Indeed, it is easy to do.

    You do not have to use GREP, you can use the query to search/replace text.

    Start by creating your character for "BOLD" style. (Let's call it "CBold")

    Then create your paragraph style, with your desired settings (let's call it "PReg")

    Finally, click on search it icon 'specify attributes to find', 'Bold' and replace it with character styles and paragraph previously defined:

    Who will do the job.

    Please note that this "erases" all text attributes (for example, italic...) in your paragraph.

    Also, it will apply changes to paragraph all if no style is specified in the search for options: including securities i.e.

    So, be careful when you use this method...

  • GREP to change paragraph style?

    Many people, I have a one for all what you out there smart people. I think GREP can be used to change the formatting in the next instance, but I have no idea how set up.

    I have a very long document, essentially a telephone directory of type list of names, telephone numbers, addresses, well over 150 pages. Paragraph styles are fairly simple, two only by registration. The name/phone number is "BOLD", with a tab on the right points pointing to a phone number that is aligned to the right of the column. The following lines are at the same level on the left, not fat, but indented 6pts. I placed the text file and assigned the NameListing paragraph style to the whole thing. I would like to use GREP to find lines of addresses and change the paragraph style NameListingAddress.

    Here's a screenshot to give you an idea of screen. The left column is correctly formatted with both styles, the right column is "raw", all paragraphs formatted with the paragraph style NameListing.

    What is an application suitable for GREP? If so, how I set it up to only change paragraphs who "do not have tabs? It would save me a crapload of time.

    Screen shot 2011-11-15 at 8.10.43 AM.png

    THANKS again! -Dina

    The easy way would be to do the reverse of what you're trying: together all the paragraphs of your NameListingAddress style (rather than NameListing). And then do a plain old ordinary search for tabs, do not put anything in the line of "change of...". "(or put another tab in) but the value of change in Format to the NameListing style paragraph in the context menu. Change (after you have checked some of them to make sure it's doing what you want).

    It is probably a way to do this with GREP, but it would be much more difficult.

  • Style GREP in the paragraph style

    I am wanting to create a GREP style that uses a character style. Whenever certain words (no classes) appear followed by dates. Sometimes, it's a unique and sometimes more than one date. For example:

    No class 7/11.

    No class 7/11-8/11.

    What I have so far is:

    No class \d+.

    It works very well through the words 'No class' and the first digit, but not for the whole sentence. I tried different combinations, but nothing works.

    Can anyone help?

    Jay

    The first expression grep in your screenshot does not work because you have added / /, which I should have mentioned should be omitted (including all spaces preceding) - sorry about that. It should read this:

    No class\s [-\d /] +.

    The hyphen is necessary to match the dates like 7/11-8/11.

    As the level of positions with dates and parental guidance optionally, this one works on your example:

    \d[-\d\. My] + [my] (, demands. +)?

    which is a little more secure that Reese, it's because it requires that the date ends in M or y. The? Suite (, requires) makes between it brackets in option. Remember that grep is case-sensitive: If your months can be tiny m thus, use [-\d\.] MMY] for your character class. You may need to tighten the grep to match the dates according to the formats possible.

    Peter

  • remove the grep in paragraph styles

    Hello

    I added grep styles to my para styles:

    for (var i = 1; i < myParaStyles.length; i ++) {}

    var myGrepStyles is myParaStyles [i].nestedGrepStyles.add ();.

    myGrepStyles.grepExpression = '. '. (?=»)";

    myGrepStyles.appliedCharacterStyle = myDoc.characterStyles.itemByName ("Stylename");

    }

    in a new version, I have to get rid of these grep styles. Replacing the stylename with "[None]" does not, and removing the style isn't a solution either, as it could is used somewhere else.

    any ideas?

    Thanx

    You can remove GREP styles:

    myParagraphStyle.nestedGrepStyles [0] .remove ();

    If there are two or more GREP styles in a paragraph style, loop through them.

    Peter

  • 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!

  • GREP for changing the style of paragraphs ending with '='

    Hi, I work with a giant list of the names and dates of graduation. Each line ends with a space and an equal sign must have a special paragraph applied to her style. Is it possible to design a "find/replace" for this, instead of manually? I can't understand what would work the GREP search string - I've never worked with him before, and I can't find anything in the lists of the metacharacters that would do the trick. Any ideas?

    In find it on the field just type = $ ( means hit the bar to type a space). The $ at the end means the end of a paragraph, so he could find no instance anywere elsewhere in a paragraph, which is the only reason why you have to GREP for that instead of a search of plain text.

    Set the paragraph style that you need in the form of the change.

    It works only if it IS indeed the end of a paragraph, however. If you have several lines in the same paragraph that ends with =, or more text in the paragraph after the =, you need to show us the structure. Don't forget that the paragraphs can have style single paragraph, applied to the whole paragraph. If you need several styles in the same paragraph, you need to use character styles, which can be applied as nested styles, line styles and GREP styles, or manually, depending on the structure of the text, you have to work with.

  • Script for grep that looks for the B of paragraph style paragraph style

    Hello

    I am fairly new to scripting in Indesign, and I ran across something I want script that I do not know how. Among the paragraph styles that are in our files are Normal and song. I need to add an extra paragraph return between all instances of normal followed by a song. I tried to search the forums to see if what was already here somewhere, and if it is I didn't come through it. I want to implement in the form of script grep, but if anyone has another way to do it, I would like to know also.

    Thanks in advance

    Hello

    For example, you can use a script.

    I guess a block of text with a correct history is selected and the history is in a setting or related frameworks.

    ....

    monarticle = app.selection [0] .parentStory;

    If (myStory.constructor.name! == 'Story')

    {

    Alert (' select a destination text block, then try to pls\rand ");

    Exit();

    }

    myNormal = app.activeDocument.paragraphStyles.item ("Normal");

    mySong = app.activeDocument.paragraphStyles.item ("Song");

    app.findTextPreferences = null;

    app.findTextPreferences.appliedParagraphStyle = mySong;

    mFound = myStory.findText ();

    Len = mFound.length - 1;

    If (len > = 0)

    While (len)-

    {

    currPara = .paragraphs mFound [len] [0];

    If (.appliedParagraphStyle myStory.paragraphs.previousItem (currPara) is myNormal)

    currPara.insertionPoints [0] .silence = "\r";

    }

    ...

    Rgds

  • import the grep styles in more than a paragraph style

    Hello

    First of all, I must say that I have no experience in scripting. I do not create scripts, simply use the.

    I have a script that imports a paragraph style grep styles to another (in the same document). Whenever I use it, I have to change the script, captures the source paragraph styles and target in this piece of code:

    source = "origem";

    target = "alvo";

    What happens is that sometimes I need to do this lots of times (especially when the updating of old projects). Is it possible to import styles grep for more than a paragraph at the same time, listing multiple targets?

    Thank you!

    Sorry,

    the variable 'source' changed during execution of the script old th. Don't have a close enough look...

    Please replace:

    function setGrepStyle(){
    var target = arguments[0].toString();
    error = "";
     basePStyle = theDoc.paragraphStyles.item(source);
    if (!basePStyle.isValid) error = 'Source style does not exist';
     var target = theDoc.paragraphStyles.itemByName(target);
     if (!target.isValid) error += '\rTarget style does not exist';
     if (error != ""){alert (error); exit()}
      gs = basePStyle.nestedGrepStyles;
     for (i = 0; i < gs.length; i++)
            target.nestedGrepStyles.add (gs[i].properties);
            }
    

    Work here, if this does not work on your machine, I'll write a new piece to add to the SNA nestedGrepStyles ship off the doScript is not really necessary...

  • Script or a paragraph Style?

    I have an Excel worksheet with name, phone and category.

    It is true - I'm a noob InDesign - but I pick up things quickly.

    I want to format this info (more than 600 entries) in an almost "telephone directory" as put on the page.

    3 columns, "BOLD" first line, tabs: leader dashed, the phone number of regular fonts, the line category: italics.

    This link:

    The name of the company ... (555) 555-5555

    Financial services

    I also need to adjust the spacing between each (space) after paragraph, kerning between company name and the beginning of the «...» "(and after).

    Paragraph style does not... style entry all as the first line.

    Should I build a script?

    Thanks to anyone who takes the time to add an idea.

    -Josh

    Here's a little cast of the screen.

    There is a small blunder that grep change should have been made before the text of the amendment.

  • best judgment for paragraph styles, object styles and character styles

    I want to learn the criteria difference and use of paragraph styles, object styles and character styles. I know how to use them, but know about the best judgment and context, when you use would be better. Can anyone recommend links? I've been using adobe. Please don't suggest books.

    Paragraph styles are whole paragraphs.

    Character styles are letters or isolated words. Do not use the long of an entire paragraph. Do not set all the attributes, only those who are different for the properties of the paragraph Style. Unlike Quark Xpress, in InDesign are character Styles used only for the difference of isolated words.

    Paragraph styles can include the character automatically Style: Styles, GREP, nested Styles, initial letters, chips automatic & numbers and line styles.

    Object styles , set the frame of the object. They include separate definitions of all of the object, the stroke and fill.

    Object styles can also be applied to images in a frame and groups.

    Object styles may also include in the following paragraph Style and a style of paragraphs in automatic way.

    Object styles have several categories, you can choose which category is relevant to apply. For example, it is possible to apply the first style object to give the stroke and fill and apply a different object style to format the corners only and then apply the next. (With this method last only the applied object Style is linked).

    Styles of the opportunity to make global changes in a document. If you build in a smart way, they are a huge time saver. They can be stored in the CC libraries or libraries with objects that are applied to them. If you have created once these styles, you can use them again, and with one or two clicks, you can make their own to new document.

    My recommendation: the habit of Styles, name them always with the same names that it helps you to be accustomed to them and to work faster, much faster.

    There are more models: Table Styles, Styles of cell, the Master Pages and color chart.

  • Following paragraph style

    Hello.

    MS Word has a cool feature which is the following paragraph Style. I'm looking for an equivalent feature in Indesign CC 2015, but it seems that it does not exist. If someone could confirm this? If so, has anyone at - he found an alternative route to overcome this big miss Adobe?

    (Note: I need to paragraph style, style, no characters that GREP or nested would work).

    Thank you

    Antonio

    It does not exist. and it's in the paragraph style palette.

    There is also a style to apply, then the next formatting of existing text style option

Maybe you are looking for

  • Question about RAM expansion on satellite notebook

    Hi all I am currently looking to upgrade the ram on a satellite notebook. I looked everywhere and couldn't find what model it is, the model number is PSA-00300C8J if that helps. Now I looked and you can see that the laptop has only 192 MB of ram inst

  • ITunes on my old MacBook Pro does not recognize my new Iphone

    ITunes on my old MacBook Pro does not recognize my new Iphone... but apparently I can't download the new version of Itunes to this model of MacBook Pro? (according to the message that I get)... So I can't transfer my photos / apps / data, etc., for m

  • Update of mess even once, will not download, searches are endless.

    * Original title: updated new disorder It is the 2nd computer with which I had problems with major update. Will not download, search are endless. Now he says I never downloaded an update. I tried the suggested corrections and do not work. Said the mi

  • Picaview alternative? (do right click look a photo)

    I am using Picaview for several years and really make as we look at a picture of right-clicking function... a tile only appears in the window made fast... right click and then if you click on the thumbnail it opens very fast without cooking a new ful

  • Get the byte [] for a COD that is already installed

    Anyone happens to know and be willing to share, how to get the byte [] for a COD package that is already installed on the device? Thank you