Automatically launch all my GREP searches

Hello

Is it possible to automatically launch all my research GREP in a document? Perhaps via the change to find script?

Kind regards

Anita

Hi John,.

Using the Multi-find/Change or Peter Kahrel grep query Manager [InDesign: GREP questions overview |] [Peter Kahrel] too!

Tags: InDesign

Similar Questions

  • GREP search for all characters

    (Indesign CS6, Windows 7)

    For a book that I'm layout, the author marked text that should be indented like this:

    [indent]

    < paragraph >

    < paragraph >

    ...

    [indent]

    (Of course, in an ideal world, the Publisher would have charged the author simply use a word for this function.)

    I made a for the text indented paragraph style. I wanted to replace it in one shot, GREP search:

    (\[indent\]) ([.| \s|\r]+) (\[/indent\]) the middle part meaning one or more (+) of any character (.) or space or paragraph return. Replace it with:

    $2 and the paragraph style (getting rid of the markers at the same time).

    Nothing has been found. I changed it to (\[indent\])([\w|\s|\r]+) (without the end marker [indent], to see what would happen) and now he found something - but stop at the first mark of punctuation (only reaching no not the end marker). So I tried to fill in punctuation: (\[indent\)] ([\w|\.|-, |: | \s|\r]+]) and each time more was found (by the way,------. here means a complete stop). If it works more or less.

    The problem is, is a technical manual and most equations etc are in the text that should be indented, so there are a lot of characters who are neither letter or number. And of course you can not call it a clean solution.

    It's the kind of string search and replace I would also use on many other projects. Does anyone know a better solution? Now, 'any character' doesn't seem to work, there at - it a code for "any character being not not a letter or number? Thanks in advance.

    Try (? s)(\[indent\]\r?) (.+?) (\[/indent\]\r?)

    The (? s) runs on single line mode so it can be found through several paragraphs and the (. +?) is the shortes match between the tags. I've included returns after the tags, if there has, based on your example that the tags are separate paragraphs. If they are at the end of the paragraph that you want to keep, remove the \r? to avoid losing the paragraph breaks.

  • TextWrangler, AppleScript, and Grep search

    Hi all

    Not really an AppleScript script engine, I would need to automate (with [ACE], no [JS]) searches grep in TextWragler to clean up the XML files.

    My start is:

    say application 'TextWrangler.

    set result to find 'aaa' , research in options of the window text 1 {:of thesearch modegrep}

    if (found from the result) then

    the value text of (found object of result) to substitution of grep of "xxx".

    end if

    set result to find "bbb" research in { window text 1 options { }:search modegrep}

    if (found from the result) then

    the value text of (found object of result) to substitution of grep of "yyy".

    end if

    set result to find "ccc" , research in options of the window text 1 {:of thesearch modegrep}

    if (found from the result) then

    the value text of (found object of result) to substitution of grep of "zzz".

    end if

     

    end say

    It does not work. I get an error message:

    Capture d’écran 2015-07-04 à 13.21.41.png

    ... When I run the following script:

    Capture d’écran 2015-07-04 à 13.22.08.png

    Thanks in advance!

    Obi - wan, try this.

    Tell application "TextWrangler.

    say text text window 1 1

    replace 'aaa' using the 'xxx' options {search mode: grep, starting at the top: true}

    replace 'bbb' by using the 'yyy' options {search mode: grep, starting at the top: true}

    replace 'ccc' with 'zzz' options {search mode: grep, starting at the top: true}

    tell the end

    tell the end

    Greenrookie

  • When I run Firefox I get msg indicating that the site is not reliable I get this for all engines of search, google, Bing, Yahoo, etc.

    When I launch Firefox normally it goes right to my Google page, but recently when I run Firefox I get a message indicating that Google.com is a unreliable site. I get this message for all engines of search, Google, Bing, Yahoo, etc. How can I solve this problem?

    You run Kaspersky, correct? If you use the SSL scanning feature, Firefox must be put in place to approve the present Kaspersky false certificate to decrypt your secure connections. If you used the discount during the last update function - for example, Firefox says it's a bad performance and offers to restore some default settings - you have to do it again the installer of Kaspersky/Firefox.

  • Looking for a plugin to automatically update all my favorites.

    I'm looking for something, maybe plugin, which automatically update all the plugins I have recorded. I've used Opera for a long time and I remember that you could get the plugin it could check if the links to all the bookmarks that you have stored are valid and download icons fav for them. Is there something like this for Firefox?

    I have no personal experience, but you could check what is available on the website of modules. Here's a Google search to help you get started:

    https://www.Google.com/search?q=bookmark+%28check+or+update%29+site%3Aaddons.Mozilla.org

  • Sensory Touch on dv7-1451nr automatically launch Microsoft Excel

    Sensitive touchpad on HP dv7 = 1451nr will automatically launch microsoft excel. The volume control will still work but excel continues to run each time it is typed.

    either you have a microsoft or keyboard wireless mouse? If so click on Start menu, go to start of field research - in the start search field type in msconfig press on enter - click on the tab of boot-now you will see start point and producer. biggest startup item list, so you can read it. then you're going to amine low indicate find you something that says microsoft and microsoft pro inteli (or something to that effect. If you find microsoft inteli its probably going to be the one below it.) Uncheck the two boxes. then click on apply and then restart the computer and see if pressing the volume open excel keys. If it persists. Return to msconfig-go back to start point - at this stage you will look for something that says that the launch buttons hp fast. Uncheck the box, click apply then OK and then restart the computer. now, when the computer restarts, and make you your icons, see if excel is opened at this time while pressing the volume up and down keys. Please post back if this does not work for you or just message me and I'll be more than happy to explain the process :-)

  • Numbering of the GREP search result

    Hi all

    I am trying to apply some paragraph styles to various items in my document, but rather than static reference to the paragraphs in question (whose position can be subject to change in the future), I try to do a GREP search result-based. The chapters follow the same structure, with a subtitle of chapter ("Chapter 1, Chapter 2, and so on"), followed by a paragraph with the title of the chapter, followed by the first paragraph of the body.

    Now, it is easy for me to find the chapter number using a GREP search, and I would like to know if it is possible for me to read the number of paragraph of this search result. In this way, I can start the paragraph numbers of the remaining items on their position relative to the subheading and then apply the styles to paragraph appropriate for them.

    All the best and thanks in advance,

    Julian

    p.s.: as a reference, this is the result of the search:

    
    
    
    
    // Find chapter subheading and apply
    
    
    
    app.findGrepPreferences = app.changeGrepPreferences = null;
    
    
    
    app.findGrepPreferences.findWhat = "(?i)Hoofdstuk \w*\r";
    
    
    
    var myStartLine = myDocument.findGrep(); // Save search result for future reference as a first line
    
    
    
    app.changeGrepPreferences.appliedParagraphStyle = myPGS_CS ;
    
    
    
    myDocument.changeGrep();
    
    
    
    

    Just another idea: If you can find your first paragraph apply the paragraph style, and then loop through all paragraphs in the document and compare the name of the applied style. If you found one, the next paragraph is the current a + 1, the second is the current a + 2.

    var curDoc = app.activeDocument;
    
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "Head \\d\\r";
    app.changeGrepPreferences.appliedParagraphStyle = "h1";
    
    var startLine = curDoc.findGrep();
    curDoc.changeGrep();
    
    var allParas = curDoc.stories.everyItem().paragraphs.everyItem().getElements();
    
    for ( var p = 0; p < allParas.length; p++ ) {
        var pStyleName = allParas[p].appliedParagraphStyle.name;
        if ( pStyleName == "h1" ) {
            allParas[p+1].appliedParagraphStyle = "p1";
            allParas[p+2].appliedParagraphStyle = "p2";
        }
    }
    

  • Exceptions in GREP search

    Is it possible to formulate a GREP search to search for all occurrences of a word except where it appears in a web address or e-mail address?

    For example, to find all the examples from Adobe , but not those in http://www. Adobesystems.com or Sales @adobe. co.uk

    Thank you very much

    Keith

    OK, it seems to me that you want to search for whole words, or the beginnings of words that end in s tiny or higher, or an apostrophe. You can use the anticipation (? = [.,'\ssS]) to stop the match a white space, period, comma, apostrophe or any type of s, but it will fail on adobe.com, if you want to find Adobe. at the end of a sentence. Seems to me, however, that you can remove the class period and use it in an expression as part of a second 'or' like this ()<><(?i)adobe(?=[,'\ssS])) so="" that="" it="" will="" match="" adobe="" before="" a="" period-whitespace="" (end="" of="" sentence),="" but="" not="" period-any="" other="" character="">

  • GREP: Search and replace

    Does anyone know if its possible to take a list (shown on the lower part of the image) and run a GREP search and replace to create the list of tabs (shown on the picture)?

    I know that the majority of it can be made with the regular search and replace: separate the first and last name; MD and MD #; Postal code and telephone number.

    What I was not able to understand is how to add a tab forward and backward the state abbreviations 2-digit, the Middle Initial, phone number and more important even if there is a way to add tabs in when there aren't the same amount of lines, such as the field of specialty.

    I know that I can use the GREP search and replace to add a tab before each paragraph back, then remove the tab where there are 2 paragraph after each game returns, then substituting a tab and a paragraph back to just a tab, together running all the rows in each set.

    Any help would be greatly appreciated, and if there is anywhere I can learn more about GREP, I would love to learn it.

    Thank you

    Peter

    Doctors List Styles.png

    Peter, try this...

    Find:------.<>

    Replace: \t$0

  • Help with GREP search and replace

    I've never used grep before and I'm stumped.  I have a document that lists the times for different classes.  Times are variously listed as 9-10, 9-10, 9-10 or 9-10, to get examples.  The problem is that there may be no space or a space on the left or the right of the hyphen.  I want it all the time as 10:30 - 11:30, for example.  In other words, the link must have a space on each side of it.  I think that this could be accomplished with GREP search and replace, but I don't understand the syntax well enough to make it work.

    Can someone tell me how to write the search and replace expressions?  (Of course the real time could be any hours).

    Thank you!

    It is tempting to add spaces of * all numbers separated by a dash. If you don't know all time have some minutes, then it is safer to use this:

    (?<=:\d\d)>

    .. Replace with space hyphen space.

    He seeks the "settler, any digit, any digit" (which is * found * not * included *), followed by 'optional of a space, a hyphen, optional space' and must be followed by 'any number' (again, not counting this one). Since the figures before and after are * found * not * included *-which is due to the (? xxx) syntax - all that needs to be replaced is the dashboard itself. Making the space before and after the optional dashboard (using a single "?" immediately after each), no matter if it * is * a space or not, all the combinations will be found and replaced.

  • GREP search blocks InDesign

    Hello

    I have a script that imports XML and formats. Under formatting, there are many GREP searches which remove space superfluous, feedback and so on.

    One plant particularly InDesign and it's driving me crazy.

    It is supposed to remove redundant returns in a table:

    GREP search returns redundant

    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findGrepPreferences.appliedParagraphStyle = "ArticleMinister";

    app.findGrepPreferences.findWhat = "\r$";

    app.changeGrepPreferences.changeTo = "";

    app.activeDocument.changeGrep ();

    The problem is there is a XML closing the tag between the carriage return and the end of the para, i.e. data {return} < / closingtag >, but it works very well if the XML for data < / closingtag > {return}.

    Any help would be most appreciated.

    Hmm... I can tell you why it happens, but fixing... HM...

    your search removes not only the '{return}', but also the closing tag, so the becames XML invalid.

    simple correction: change the xml first move all closing tags before the back tank.

    more difficult fix... something like get all XMLElements, check if the last char in xmlContents == '\r', check if she is at the end of the story, remove it.

  • Grep search for Roman numerals

    Hi, Indesigners...

    Can someone help me with a grep search to get all the numerals in a text?

    Thank you

    Maria

    You can search for \b[ivxclm]+\b, which translates as "any whole word which consists of one or one of the ivxclm of letters", which corresponds to i, vi, xli, but he also mic and vix. So make only the interactive search and replacements.

    Peter

  • With the help of markers of reference in a GREP search

    In a document of 300 pages, with hundreds of notes, I want to insert thin spaces between single endquotes and reference markers. The easiest way seemed a GREP search and repace. I search (\')(~F) and replace it with $1 ~ <$ 2. The result is ' ' (endquote-thin space-endquote). When I try to replace the AB to A-thin space-B in the same way, the result is good. So what goes wrong? ([I also tried ~] for the endquote.)

    (By the way, I have a workaround, but I want to understand how GREP search work.)

    Notes are not really part of the semi-official GREP definition, and I imagine that Adobe programmers had to fix some workarounds to make it work at all. They are not characters simply unique (quotes, spaces and possibly text are variable) but 'contains' a lot more information, as do the anchored objects. This could be the reason why they are not fun to play with GREP regular operations.

    In this particular case, you can bypass searcing for the marker reference code and replace. Search

    (\') (?=~F)

    and replace with

    $1 ~.

    The combo (? = ~ F) will be of find, but do not include the reference code and so much work around the problem.

  • GREP search / replacement issue

    Hi all

    I'm new to GREP searches, but I had a lot of success in my current document (CS3). I'm running a problem now, however. I am trying to replace a manual coding with a paragraph style sheet and the paragraph (in this case italics) already applied character style leaves change when they are applied. For example in this sentence:

    "For what purpose, then, of conscience at all when it's in the main superfluous?

    changes made to the

    "For what purpose, then all conscience at all when he's in the main superfluowe?


    When I use my GREP search and replace. For the rest of this paragraph, the paragraph style is applied correctly, it is really strange to local formatting to be switching where it is applied.

    I searched the forums and haven't found anything on this issue, any ideas would be greatly appreciated.

    Thank you!

    I'm sorry to confirm your woes...

    It is a "bug" of sorts - you change the length of the text with your GREP, and ID forgotten somehow adjust formatting when text is deleted. I tried a few varieties because it usually works okay-ish, CS3, and CS4. With your sample, I couldn't remove even a single character without "moving" the formatting as well.

  • Deals4U is popping up on all my pages search. I NEVER loaded it. How do UNINSTALL you on a MAC?

    Deals4U is popping up on all my pages search. It started with the new update of Firefox! I have NEVER LOAD Deals4U. When I clicked on the option to uninstall the application, the link tried to download an *.exe file. I'm a MAC user! In addition, Deals4U does not come in my modules or Extensions. How can you UNINSTALL Deals4U on a MAC?

    Hello quinns5x,

    Please contact the Mozilla Support. The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.

    Note: This will make you lose all the Extensions and preferences.

    • Sites Web open is not recorded in less than 25 versions of Firefox.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

    Thank you.

Maybe you are looking for