Grep search / text search + spent research

Is it a way to erase the previous GREP search / text (search/replace) searches for 'search' and ' change in "boxes? Is - this specific document or a matter of preference ID?

Find-Change.png

These lists are stored in the file InDesign SavedData (part of the prefs.). You can remove them by closing the ID and by renaming or deleting the file to your user library (it's a file hidden, by the way). You will also lose your list open the recent item when you do this, but probably nothing else you won't miss.

See replace your preferences for the location of the file.

Tags: InDesign

Similar Questions

  • Grep search only on the current page, return array "search everything".

    Hello

    Is there a way to grep search only the current page, or any page chosen in my paper (myDocument.pages [i])?

    I can only manage to search for in the document.

    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findGrepPreferences.findWhat = "Chapter (\d+)";

    myDocument.findGrep)

    Also, is there a way to return the content to find? In this case, I want the $1 this research...

    var a = myDocument.findGrep (). ?

    Thank you

    Christopher

    the error is because you have not initialized the tabular myRet variable.

    Another problem is the use of textframes.everyItem (), because that returns a different object.

    and another is what happens if a textframe is empty you will get an error on the meaning of "object has no text for find/replace.

    Here is the fixed code:

    var myRet=[]
    var myDocument=app.activeDocument;
    var tf = myDocument.pages[0].textFrames.everyItem().getElements(),
    tf1 = myDocument.pages[0].textFrames.count();
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "Chapter";
    for (var i = 0; i < tf1; i++){
     if (tf[i].characters.length){
    myRet=myRet.concat(tf[i].findGrep());
    }
    }
    alert(myRet)
    
  • 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.

  • Problem with GREP search

    I have a GREP search that finds characters in importing XML < i > and < /I > that surround it make italic text:

    Search text with ^ I ^ and ^ / I ^ around it. ITALIC

    app.findGrepPreferences.findWhat = "(\\^I\\^)(.+)(\\^/I\\^)";

    app.changeGrepPreferences.changeTo = "$2";

    app.changeGrepPreferences.appliedCharacterStyle = "italic";

    app.activeDocument.changeGrep ();

    The problem is that if there is two blocks of text in the para with the codes around him, he finds the first < i > and < /I > last code and put the text in italics .

    Thus, for example, "the quick brown fox < /I > < I > leaps over the < I > < /I > lazy dog as example text"

    as ' the quick brown fox < /I > jumps above the < I > lazy dog as example text ",.

    and not "the Quick Brown Fox jumps over the lazy dog as an example of text".

    I hope this has a simple fix, but disappointing because I thought I had nailed!

    Thanks in advance for any help (as always).

    Simon.

    Well, as the saying always Jongware, GREP is greedy and always want to pick up as much as the expression allows.

    Simply add the question mark after the sign more, and you get the result you expect.

    app.findGrepPreferences.findWhat = "(\\^I\\^)(.+?)(\\^/I\\^)";
    

    Hope that helps.

    --

    Marijan (tomaxxi)

    http://tomaxxi.com

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

  • GREP - search for anything except a single character

    Trying to figure out whether or not I can tell GREP...

    I want to search for any character who is a character Exhibitor style except for the symbols of the registration mark.  Is it possible to exclude a character of a search?

    Thank you, Phyllis

    Altogether. Don't forget the ' ^' character that indicates "start of the paragraph? Well well... whoever designed the GREP apparently ran out of useful characters, because it is reused in the group 'exclude '. It works like this:

    [0-9fuzzy]

    looking for a unique character in the series of '0' to '9' (inclusive), 'f', 'u', 'z' or 'y '. Throw in the hat cancels the query:

    [^ 0-9fuzzy]

    looking for any old character unique except those in the game.

    The registered mark has a shortcut of its own to the regular find-^ r - so it's probably "~ r" GREP mode. Otherwise, copy and paste your text. Your GREP search must therefore (with setting shaped exposing)

    [^~r]

    It is only the following character unregistered; to search for longer strings, you can safely use

    [^~r]+

    -which translates by "any string superscript, a character or more and containing not the mark registered. Yes, the short version is a little easier to type.

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

  • Can you make a menu for the click Search right so that when I text matches and research, I can choose which search engine to use?

    If you text matches you can right click above to pull up a menu runs. One option is "x search engine search for"highlight text"" previously, the selected search engine would be any search engine was selected on bar search, Google or Amazon.com, etc.. Because you can't change this selection until you are looking for, the search engine has the default value. Was a gene before, but now, it's just an obstacle.

    Highly recommend the extension of research framework that will solve your problem

    - https://addons.mozilla.org/en-US/firefox/addon/context-search/?src=search

  • How to limit a GREP search to the selected text

    Hello

    I have a script GREP seeking gaps in a series of endnote numbers. This helps a corrector to know quickly if a number was inadvertently left out.

    However, in a document number series can be repeated because the document contains more than one chapter.

    So I guess I could write the script search for a series of numbers in the selected text, i.e. an entire chapter. But, looking at the properties for findGrepPreferences I don't see all this limits the search to a selection. However, the GREP dialog box allows a search of Documents, Document, history, to end of history and the selection.

    Where can I find these properties?

    Tom

    You perform a loop on theRange:

    finds=[];
    for(i=0;i
    

    I'll just write all...

    This should work (untested):

    var myDoc = app.activeDocument;
    var firstPage = 2;
    var lastPage = 4;
    var myRange = [];
    for(var i=firstPage;i
    

    Substances

Maybe you are looking for

  • How to transfer your messages to the iPhone 6 for macbook

    GGetting a new iPhone would like to keep the messages from the old iPhone 6 on my MacBook. How do you download messages from the iPhone to MacBook.

  • the Wi - fi menu icon blinks

    The WiFi menu icon continues to show a search when the wi - fi network is strong on all devices and the internet is fast on the whole.

  • update my settings of firewall for the installation of google chrome

    Unlock my firewall for the installation of google chrome settings

  • How to add icons to the desktop

    original title: I would like to know how to replace my desktop, the desktop icon, I tried and they seem to be in my taskbar instead of the desktop computer, ++--s to all the shoing on my desk. I have no icon on my desktop, when I right click on my de

  • Restore backup files

    On my old computer, I had to restore XP to factory because of problems with system settings. The option I have chosen has allowed me to save my files and I can see the lists of directories and files in the folder "My Backup", but could not find the f