help search GREP?...

I have not worked with GREP search in a while... I need to search and find all the text preceding a hyphen several times in a document and the change to a different character style. Can someone give me the codes/characters to do this research?

good point... How the end of bold to the em dash... (I realized it's an em dash not hyphen)

Tags: InDesign

Similar Questions

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

  • Help with Grep Lookaround

    I'm trying to find the first occurrence of a block of text (American) and everything up to but not including the second occurrence of the same block of text. The type of content between the two blocs can be anything, including fractions. The number of lines between two occurrences varies.

    I use the following without success grep search statement.

    ((?<=) \AAMERICAN) (\d*[\l\u]*.* * \w*\u*\l* *) ((?!) AMERICAN)

    Can anyone lead me in the right direction please?

    Thanks for your time and your help.

    Try this:

    ( ? s). AMERICAN. + ? (? = OF AMERICA)

    (? s) is the acronym mode only "line, you need because you want to cover lines, and. does not match (i.e. don't go beyond) paragraph boundaries (i.e. \r). Then do you match the everyhing to the first occurrence of AMERICA until the next occurrence. (? = AMERICAN) is the abbreviation of ', not to mention AMERICAN. '

    Peter

  • Helps the GREP query

    Hello

    I'm struggling with a Grep style and need a little help.

    I write a manual containing many examples of code and you want to apply the color to the text inside "double quotes".

    Grep query ("? < =------="). + ? ("? =") is almost what I need but if it finds "" the query seems to stop to find anything afterwards.

    The------= in the look ahead is because the first "always follows a =

    For example:

    "" < page PREVIEWTEXT = "1" name ="previewtext1" column = "1" rowspan ="6"invite"" width = "250" height = "290" / > "

    After the prompt empty"", the search query is no longer "250" or "290".

    Anyone has any idea why?

    Thank you.

    And, in the case where you think that this is already a total mystery:

    I wondered what would happen with quotes. After all, the GREP search was to treat each of them even. Well - it does not work. The "\x{22" code} forces a straight quotation mark, so it will never match those curly. Fortunately, you can use a group for inclusion in the postanalyse:

    (? == [quote straight + curly quote open + curly close quote])

    (written in full so you can see what I've done.) But I accidentally stumbled upon this:

    (?<==["])[^"]+?(?=")
    

    ... it works for all possible combinations of straight open, curly and curly close quotes... Remove the [] in the postanalyse and it no longer works. Add them and it works again.

  • Need help with GREP expressions

    I know - KNOW - there is a way to do it, but keep my GREP expressions.

    I want to add an em dash before any sentence that is in a paragraph style. So I obviously want the em dash to be in the 'start of the paragraph' location. Lack of keep all my GREP searches. Can anyone help?

    Adobe of the 'start of the subsection' implementation is just a little off the coast of standard GREP (which, in itself, is less a set of hard and fast rules but rather as "guidelines"). Yes - you can Search for beginning of paragraph using plain ^, but you cannot use it with a replace operation.

    The trick is to give something to look for in InDesign. Search

    ^.
    

    (it's just - a wildcard just after the start of a paragraph). You don't want to lose the character it finds, so replace it with

    ~_$0
    

    where the first 2 codes is your dash and the last 2 is 'the text together. This is your original found generic character!

    Don't forget to put your paragraph style in the box of formatting to find.

    Of workaround works around the failure of implementation, because indeed, you want to add something to an existing text. Unfortunately, another pretty standard GREP to search for empty paragraphs-^ $-does not work, because then you have no room for a wildcard... (and Yes, you pouvez use a hard return instead of code \r is first or last, but then it will not work at the beginning or at the end of the story). It's one of those things that I wish to see corrected with CS5.

    [Edit] HA! Peter beat me to it, but he has made a typo. In addition, my story is longer.

  • Need help with GREP query-extract

    Hi people,

    I'm trying to harden a GREP query, I have reconstitute.

    This discovery channel allows me to search for text in the < ex > tags and remove the tags themselves. We then apply the Exchange my extract paragraph style field.

    ( ? s). (< ex > *) (.+?) (* < /ex >)

    What I need to do is add a blank line above and below the excerpt. In addition to the string?

    TIA

    Yes, by changing to \r$2\r

    BUT this text is already a paragraph? If this is the case, it would be preferable to add a space before and after as part of the style. If this isn't the case, I'm not sure that adding the returns in the same operation will not change the text from which it is extracted, then you want to find all first . +? change \r$0\r without change the formatting and then run that you now have to change the format on the excerpt.

  • Help with GREP

    Hello world!

    I need assistance with grep style.

    I want to apply a character with "BOLD" for each text style, in a specific paragraph style, Reed media before uppercase.

    For example:

    -Za ispušta proizvod u CIJEV ZA OBLIKOVANJE vaganje Sustav (1)...

    Must be:

    -Za ispušta proizvod u CIJEV ZA OBLIKOVANJE vaganje Sustav (1)...

    Can someone help me?

    Try this one: find \u[\x20\u]+? ( ? =\()

    In other words,.

    \u followed by capital

    [\x20\u]+ one or more space (\x20) or a capital]

    (? = \x20\ () followed by a space and an open parenthesis - but don't capture the spece and the parenthesis)

    In the format change Panel, set "BOLD".

    Peter

  • Excluding a box character "change in" inside the box "Search" search GREP

    Hi all! I'm a poster for the first time, but were hidden around the forums for a few months. I am producing an InDesign document for a book I'm trying to get out, and there is a section where I have the following:

    |  TAB | 1. |  TAB | Lorem ipsum dolor etc.

    The text does not say literally tab, I just wanted to point that there is a space on each side of the line number tab. This occurs several times in several chapters in the Notes section. I want to remove the legs so that the result is:

    1 Lorem ipsum dolor etc.

    2 Lorem ipsum dolor etc.

    3 etc.

    I've identified how to find these sections is to use the GREP search with \t\d+.\t function. The + is there because the numbers go into double digits in most chapters for references. However, I don't want to remove these numbers, just the tabs. Is it possible to add a feature to exclude at the window "change to" the search function? I tried to leave just the form. \d, but it literally changes the text to

    \d. Lorem ipsum dolor, etc.

    This is not good. I'm trying to avoid having to do it all by hand and of course at the time wherever I get a resolution I'll probably been better do it manually, but I turned to the future and try to determine the best way to streamline this process not having no not what kind of format in the first place upon receipt of the file from my employer

    Thanks a lot for your advice,

    David

    First, let's establish that they are not part of a numbered list automatically formatted by using the bullets and numbering options in the paragraph style (though they probably should be).

    If you don't want to be part of a numbered list, you should be able to find (the ^ \t)(\d+)(\t) and changes to $2 [blank space of your choice]

    That said, I make them the list and set in a paragraph style, then find ^ \s+\d+\s+ and replce with nothing but change the format to change the correct paragraph style where are defined the numbers and the spacer. The advantage of this is that you can then rearrange, add or remove paragraphs in the list, and the numbering will update automatically.

  • InDesign: Help with Grep Styles (do not always work)

    I found this excellent tutorial which allows styles GREP simulate the functionality of the HTML tags.

    So that the cat sat on the Mat < /b > < b > will appear in InDesign as: the cat sat on the Mat.

    The problem is that this does not always work.

    Here I have two text elements that are displayed on pages separated into separate text boxes. Both have the same paragraph style applied to them (who use the technical HTML GREP)

    < b > "Make fool me super fast, birthday card from Jonathan!" < /b > add Ben.

    Holly wand Glitters and brushes lift into the air.

    "It works!" shouts Holly and Ben.

    < b > "Humpy, lumpy, bumpy, do."

    Nice and comfortable King thistle. "< /b >

    "Thank you, you can go now."

    Nanny Plum,' said King thistle.

    The first paragraph works perfectly. The < b > tags are hidden and the bold character style is applied.

    Paragraph 2 does not work. The < b > tags are hidden, but the characters are not "BOLD".

    This could be the cause?

    Here is my code GREP:

    Apply the Style HTML to text: (< \/*b >)

    Apply bold to the text: (< b >). + (< /b >)

    (Style HTML is used to hide the HTML characters. "Style"BOLD"makes"BOLD").

    Thanks for any help that can be offered

    Is there a paragraph return after 'make '? You can check by turning on the view-> display-> Normal Mode and then Type-> display hidden characters (not sure on the last of them, my phone isn't InDesign on it).

    GREP styles may cover several paragraphs. So if the opening tag "BOLD" is in one paragraph, and the closing tag is in the second paragraph, it'll never work.

  • "Invalid number" error help search interactive report on collection

    Hello - I have several collections-based interactive reports. In directian IR query definition.
    I threw the values in the collection according to the needs (number, date, etc.). Everything has been working very well.
    In development and production, I can use the interactive reports search feature
    and he finds the lines containing the text I type in (as well as everything else works fine...)

    Only, I imported a new version of an application in our production database. Now, when I use the
    search for interactive report, I always get "invalid number." This occurs even on interactive reports
    It still work in the previous version of the application of production... and these IRS
    have not changed at all.

    If I create a filter and search for "elevation" in a string column, the filter works. If I create a filter
    you are looking for a "rise" in a column for the number, I get "invalid number." (In development
    environment, I can do the latter - it does not just lines.)

    Clearly it stifles the column types in the IR... but why now and not before and why
    in the production database but not the DB development? The two are running 4.0.1.00.03.

    It is a sizable loss of features... and it comes at a really bad time... Help?

    Thank you
    Carol

    Hello

    What a lot of tests!

    Preferences, particularly sorting preferences, can cause problems because they are actually stored on the database and used next time the page is loaded. So, in the meantime, something has changed on the report sorting preferences may no longer work.

    There is a function of Apex that you can use to clear the user's preferences:

    BEGIN
     WWV_FLOW_PREFERENCES.REMOVE_PREFERENCES('username');
    END;
    

    and you can remove any sorting preferences using the:

    BEGIN
     APEX_UTIL.REMOVE_SORT_PREFERENCES ();
    END;
    

    other admin functions and which are described in: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b32258/api.htm#CHDHDFHB

    You could provide a button on a homepage (or whatever page the user can always happen to) that triggers the second bit of code - it can not solve the problem, but it would eliminate a possibility.

    Most of the time removing their sorting preferences should not cause issues - most, if not all, remember what was the sort order, they used last.

    There must be a table somewhere that stores these preferences - but I was not able to find it (but, I'm sure someone can tell us right away what it is!) - which would make it easier to empty.

    However, as I understand it, the preferences are stored using one ID region. If the problem persists, I could only suggest that you create a second region, exactly as the first and then delete the first region.

    As to the question of the user/developer session. I've seen this before. I think (and highlight 'think'!) that if you are connected as a developer that also uses the same connection to the application, then your session as part of the application does not stop really until your disconnection from the development environment. I see a disconnect in the application and then go directly to a page within the app (perhaps using the browser history or by changing the URL) will take back you in the session as if nothing had happened. It was a gene! I got around this by having two browsers (for example, FireFox and IE or Chrome) - the update was done in FireFox and I logged directly in the application in the Explorer on the other. You will also find some development easier - there is an option on the pages of the attribute at the top right that says: "return to this page. If you check this option before clicking on apply changes, you return to this page. Refresh the other browser gets your new changes. Then, if there are problems, you are already on the page that needs updating - even easier if you click on one of the selectors of the area as the setting of the problem is brought to the screen.

    Andy

  • Help entry GREP formatting in a script of substances

    I use InDesign CS5 and I'm sorry, I'm ignorant of the scripting and GREP. I hope there is a quick, simple solution one of you can offer for my problem.

    I use a free script written by substances called ReplaceHyperlinkUrlValues.jsx to replace a portion of each hyperlink URL in an InDesign document in order to be considered for a move to a new server. The script has a few areas entry find and replace. If I want to find... Server1... in each URL and replace it with... Server2..., I enter these terms and it works great (I have 700 URLs to change).

    However, I need to replace... Server1\vol1... with just... Server2... It does not, probably because there is a character of backslash involved. Can you tell me how to enter the search term?

    (Research on the web, a trick I found was to join the term to search for single quotes, but it did not work.)

    You do not have one but maybe two problems here

    The backslash is a special character in GREP; It is used to "escape" characters that otherwise are the instructions of GREP. So, if you want to search for a single period., GREP will appear to malfunction because the period itself is a GREP code (it means "any character at all"). Preceding it with a backslash will remove the magical properties and make a "literal" character instead:. inside a string GREP will search for one period, without the backslash.

    If a backslash is a magic code and is used to make the next character to lose its magic... so, logically, you need two backslashes to find one! (This deserves an exclamation point, because it is quite true).

    You can try it, and it is possible that it works, but if not:

    The backslash is also a special JavaScript character. ... And he did the same as GREP as well. You might think, well, "there is no problem", but then you are mistaken.

    1 Javascript reads your string and finds a double backslash. He knows of backslashes are special, so it will "analyze" this code and effectively store a single bar backslash in memory.

    2. the chain of memory is given to the function GREP of InDesign, who sees a single backslash and tries to put a special code with the character next to him (I don't think that '\v' is a valid code, but in any case, it won't do what you think it'll do).

    3. the search fails and leaves scratching you your head.

    So if the above fails - a double backslash when you have already used a single-, you can try with a double for each of the back-slash:

  • Search GREP [CS4/JS] problems

    I have two problems with grep research using a script written in Javascript for InDesign CS4.  The first is more serious.

    Problem #1:

    I use the following search pattern, to find e-mail addresses:

    [[: word:] \-\.] + @([[:Word:]\-]+\.) + [[: word:]-------] {2,4}

    This model works perfectly for all e-mail addresses when I use the grep of the dialog box find/replace function in the user interface, but fails when I use it as an argument to the functions findGrep() or changeGrep() in a script.  Interestingly, the problem is the part before the '@' symbol.  If I replace the part with the literal text, as follows:

    Richard @([[:Word:]\-]+\.) + [[: word:]-------] {2,4}

    the script correctly match any email address where the part before the '@' symbol is the word "richard".

    Anyone can shed some light on this problem?

    Problem #2:

    It is more general and less severe, but it is related to the #1 problem, because it's things that work in the interface user, but not in a script.

    Curiously, many of the standard regular expression stenografie wildcards for the character classes (like \w, \d, etc.) do not work when I use it in scripts, but their POSIX equivalents ([: word:], [: digit:], etc.) work fine.   Or the other terminology - \w or [: word:]-works fine in the find/replace UI dialog box.

    If this isn't a serious problem, but I much prefer the shorter terminology.  I find it easier to read and write.

    Any ideas?


    Thank you.

    A solution for your problem of consumption-instead of-in javascript.

    code to find grep in Indesign is

    [[: word:] \-\.] + @([[:Word:]\-]+\.) + [[: word:]-------] {2,4}

    and the JavaScript find grep is

    [[ : word :] \\-\\.] +@([[:word:]\\-]+\\.) + [[: word:]-------] {2,4}

    Shonky

  • [JS CS3] Why Search Grep to superscript numbers does not?

    Hello

    Here's a script that did a Grep search for any number three-digit superscript. Well, that's what it is supposed to return, but he returned every one to three digits. Any suggestions on what is wrong? If I do a manual search of Grep for the numbers that are superscript, it works fine, so I know that this is possible.

    Tom

    myDoc var = app.activeDocument;
    Notes end var = theGrepFinder (myDoc, "\\d {1,3}");

    function theGrepFinder (docRef, grepFindIt) {}
    app.findGrepPreferences = NothingEnum.NOTHING;
    app.changeGrepPreferences = NothingEnum.NOTHING;
    app.findGrepPreferences.appliedCharacterStyle.position = Position.SUPERSCRIPT;
    app.findGrepPreferences.findWhat = grepFindIt;
    var arrGrepFindIt = myDoc.findGrep ();
    Return arrGrepFindIt;
    }

    Change

    app.findGrepPreferences.appliedCharacterStyle.position = Position.SUPERSCRIPT;

    TO

    app.findGrepPreferences.position = Position.SUPERSCRIPT;

    The first trying to get to "any character style which is superscript" and this is not possible - you define only the name of "appliedCharacterStyle" for this. He gets ignored because you did not provide a name, and so she is all the numbers, rather than only those of the exhibitor.

    The embankments of the latter by 'exposing' at the same place as you would do in the GUI.

  • Help/search Web Cam

    I have a Dell laptop wireless with a built-in camera and speakers, Windows Vista, model Studio 1555.  I have trouble remembering how to use the web cam! I used to use it for photos of profile on different accounts, but also other projects.  I used the video camera but do not have necessary the web cam in almost a year. Can someone help me, please?

    [Moved from comments]

    Why don'r you wonder in the Dell Support Forums?

    http://en.community.Dell.com/support-forums/default.aspx

    See you soon.

  • Help with GREP and number formatting, deletion of the brackets. I'm halfway there!

    Hello, I need to format a ton of numbers (#) phone #-# to #-#-#. I have the research work:

    (\(\d{3}\) [] \d{3})

    But I can't understand how to make the change... can someone please help me with the ' put in place: "entry?

    Thank you!

    You can use the query already defined in the drop-down list that allows you to convert the format in brackets for a point and in the change field format to replace the dots with-, for $1 - $ 2 - $3

Maybe you are looking for

  • Apple music does not work

    Apple's music doesn't let me download new songs or browse newsongs but I can play my downloaded good media

  • Could not get iOS9.3

    When I tried to download and install iOS9.3 my phone - a 5 - I couldn't verify the download saying that it was not connected to the internet. It was certainly connected. I deleted the download of iOS9.3, which was one of the patches recommended for t

  • Two users on Skype

    Hello! I boght a new portable computer of windows 8, connected to my Microsoft account and its entries of Skype with my user. So far it's OK. My mother wanted to use his Skype, so when I saw that I can not simply disconnect, I googled for a solution

  • need to recovery for my vpcj1 disk can anyone help thanks

    need recovery disk for my vpcji any who now were I can buy a thank you

  • How to view the express project of signal in the web browser

    Hello people. I want to know if its possible to visualize a project explicitly signal in a web browser or even better control... as it is possible to view and control a VI in the Labview development environment. Thank you