GREP to find string of quotes

I have some strange "strings" of quotes for which I need to search where there are consecutive single and double quotes with nothing between them. So "'"'Wording here.'"' More here."
Can GREP be used to find a string of quotes that might consist of any number or combination of single and double quotes? The string would consist of either all open or all close quotes but could be any combination of double and single, starting or ending with double or single.
Thanks,
Ken

SRiegel wrote:
['"]+
(that's a single and a double quote inside the brackets) If you do this with typographer's quotes turned on [..]
For the finding part, there is no need to toggle smart quotes off or on. For example, a single ' will find all three variants, whereas ~[ will only match curly open, ~] curly closed, and ~' only straight ones.
Other than that, yeah, you want to make sure anyway Curly Quotes is active for the replacements.

Similar Messages

  • GREP to find two left double-quote marks in a row?

    I'm usually pretty good with regexp, but this one is eluding me. I'd like to find a left quote ~{ followed by any number of characters -except- a right quote ~}, followed by aother left quote ~{. It should match a string like (using `` for the left quote):
    ``The rain in Spain, ``she said.
    But not match:
    ``The rain in Spain,'' she said, ``falls.''
    Thanks for the help!
    Perry
    KidPub Press

    What do you want to accomplish? Do you want to change straight apostrophes into typographic apostrophes?
    If it is this what you intent, do following:
    In the preferences activate typographic apostrophes, in the dictionary part select each language and put the correct apostrophe.
    In the document take care that your paragraph styles have the correct language (and also the character styles)
    In GREP change " to ". (Eg. in German it would change a "text" to „text”, but also «text» to „text”.

  • GREP for finding wrong facing apostrophes/quote marks?

    I have this one set up
    (?<=\w)((~[|~{))
    But I'm not 100% convinced
    What I really want to search for is
    any double quote at the start of a word/sentence - but don't include it in the search
    Ignore any text
    Find the left quote or left apostrophe
    I was doing this
    .+?(\>(~{|~[)
    But that was selecting the text before it
    I just want to select the Apostrophe or the Quote marks.

    What do you want to accomplish? Do you want to change straight apostrophes into typographic apostrophes?
    If it is this what you intent, do following:
    In the preferences activate typographic apostrophes, in the dictionary part select each language and put the correct apostrophe.
    In the document take care that your paragraph styles have the correct language (and also the character styles)
    In GREP change " to ". (Eg. in German it would change a "text" to „text”, but also «text» to „text”.

  • GREP: Bolding a title in quotes at the beginning of a paragraph

    Hi,
    I trying to use GREP within a paragraph style to bold the title of a listing at the start of a paragraph. I want to limit it to the first set of quotation marks, and leave any other characters within quotes in that paragraph un-bolded.
    I used the expression below, which i thought would start at the beginning of a paragraph (^), left quotation mark (~{), any character, any number of times (.+), followed by a right quotation mark (~}), followed by a space (\s), zero or one times, shortest match (+?).
    ^~{.+~}\s+?
    Unfortunately, it bolds everything through the next right quotation mark. (See sample below).
    What can I add to the expression to restrict the GREP to find just the first set of quotes? These would be titles that may have multiple words or numbers in the title.
    Thanks in advance!
    “Images,” a 90-minute comedy-drama with music “dealing with real life issues, which is common to all, this play moves us and heals us all in an entertaining way,” says the Rev. Janet Jones. Presented in honor of Black History Month. Written and directed by Carmen Davis of Head of My Life Productions.  A.M.E. ZION CHURCH, 584 Bloomingdale Rd., Rossville; 732- 939-2885 or 718-356-0200. Feb. 8, 2 p.m. ($20 at the door) and 5 p.m. ($25). The latter show offers a post-show reception and meet-andgreet with the cast. For more infomation, call the numbers above or visit rossvilleamez@verizon. net.
    ——Mike

    If you want to use GREP, try this one:
    ^".+?"
    or delete the space from yours
    ^~{.+~}
    I can't say why, but your expression worked as soon as I took the space out of play.
    I used the expression below, which i thought would start at the beginning of a paragraph (^), left quotation mark (~{), any character, any number of times (.+), followed by a right quotation mark (~}), followed by a space (\s), zero or one times, shortest match (+?).
    ^~{.+~}\s+?
    Unfortunately, it bolds everything through the next right quotation mark. (See sample below).
    What can I add to the expression to restrict the GREP to find just the first set of quotes? These would be titles that may have multiple words or numbers in the title.
    Thanks in advance!

  • Using Grep to find/replace

    I'm trying to find out how to use GREP in find/replace to chage the formatting of some text that comes in from a spreadsheet.
    I worked out the GREP query "~b(\d\d)~b", which finds a paragraph return, followed by two digits, followed by another paragraph return
    and then it is replaced by "\t $1~b", which is a tab, the two found digits and a para return.
    What i need to do is to amend the query to find ANY number of digits, (which may be comma delimited: eg 23, 36, 48 ,50), and then replace with a tab + found text.
    I suppose what I'm looking for is a way for the query to find "any text between two paragraph returns, no matter what tthe length", but I don't know how to do this.All the Wildcard options seem to find just one exampler (one digit, one character etc)

    And you came so far
    The operators for repeat are ? (zero or once), * (zero or more) and + (once or more). You can also specify exact numbers: {at least,up to}.
    All of these operators are "greedy" by default -- they will match as much as possible. To match as least as possible (which I'm sure you'll come up against, sooner or later), add another ? after the repeat expression.
    So this will find one digit, then optionally another (which will always be included):
    \d\d?
    and this one digit, then zero or as much as ten million million zillion:
    \d\d*
    which is functionally the same as
    \d+
    And this will find between 3 and 8 digits but will forced to use the shortest possible match:
    \d{3,8}?
    That said: A quick & dirty solution for your actual problem is to find any amount of digits, spaces, and comma's:
    ~b[\d, ]+~b
    (we need the plus here because otherwise it would also match an empty line). The [..] brackets an Inclusive list --- it will match any of the single codes inside.
    A more complicated but 'neater' way is to search very specifically only for number, comma, space, number sequences -- it's neater because that way malformed lines (comma without a space) will be skipped!
    (It also introduces another code -- the parentheses operators. Look them up in a good GREP reference --lost of people are enthousiastic about Peter Kahrel's O'Reilly title, because it's about using GREP in InDesign.)
    ~b\d+(, \d+)*~b

  • Find/Change Grep only finds one instance per paragraph, where am I going wrong?

    Hi,
    I've been using a Find/Change Grep to find any price with a comma and change that comma to a thin space (Newspaper's editorial style).
    But the Grep only finds the first instance of this per paragraph.
    Sample text...
    "$200,000 $200,000 $200,000.
    text at start of paragraph $200,000
    $200,000 text at end of paragraph
    tab     $200,000."
    In the sample the grep would miss the second and third price on the first line.
    I've been using...
    Find...
    (?<=\$)(\d{3})\,?(\d{3})
    also tried (\$\d{3})\,?(\d{3})
    Change to...
    $1~<$2
    Is there anything I can add to find these last two prices?
    I've been using this in combination with Batch Find Replace script, so different greps are set up for 5,6 and 7 digit numbers that start with $.
    Thanks.

    Try this,
    Find what: (?<=\x{0024})(\d{3})\,?(\d{3})
    Change to: $1~<$2
    Vandy

  • Could not find Order and Quote objects in Record Type Access window

    Hi All,
    We are using the CRM OD (not sure about the version).
    I am trying to enable the Order or Quote Object in CRM On Demand.
    But I cannot find Order and Quote records in "Record Type Access window". Do I need to enable it form any where else first ?
    Thanks
    Sai

    Thanks for the reply Naren.
    I am implementing the "Lead to Order Integration Pack for Oracle CRM On Demand and Oracle E-Business Suite 2.5".
    As part of it I am trying to enable the Order or Quote objects from the section "Enabling the Order or Quote Object in CRM On Demand" of the document: Part No. E15784-01.
    I see the following steps in that section:
    To enable the Order or Quote objects in CRM On Demand:
    1. Sign in to the CRM On Demand system.
    2. On the welcome page, click the Admin link.
    3. On the Admin Homepage, navigate to Role Management & Access Profiles, and then Role Management.
    4. In the Role Management wizard, perform the following steps:
    a. Select the role name for which you want to enable the Quote or Order objects.
    b. In Step 2, Record Type Access, select the Can Access, Can Read, and Can Create check boxes for the Order or Quote objects.
    c. In Step 5, Tab Access & Order, move the Order or Quote items from the Not Available to the Selected Tab section.
    d. Click Finish.
    5. Click Admin, User Management and Access Controls, Access Profiles.
    6. In the Access Profiles wizard, perform the following steps:
    a. Click Edit Link beside the role name for which you want to enable the Quote or Order objects.
    b. For Step 2, Specify Access Levels, change the value of the Default Access field for the Order or Quote objects from No Access to Read/Edit for Sales Users. Set to Read/Edit/Delete for the appropriate administrative users.
    7. Click Finish.

  • Can I Index a String with Quotes. How is Men's indexed

    HI!
    I want to know that when i index a column which has a string with quotes how is it indexed ie., if there is a string "men's" then how is this indexed? because i am not able to search for men's,and when i search as "men_s" nothing is returned how to do that?
    regards
    JD

    Use the printjoins lexer attribute -
    http://technet.oracle.com/doc/oracle8i_816/inter.816/a77063/cdatadi5.htm#35052

  • Finding only straight quotes

    I’ve had the same problem other people have had with curly typography getting accidentally turned off, and I know how to go to Preferences and check the box Use Typographic Quotes.
    The problem is the straight quotes already scattered throughout the document. I tried using the Find/Change but it finds all the quotes, not just the straight ones, and this can get tedious for a 500 page document. I would like to have it find only the straight quotes, so that I can replace them with curly. CS3. Thanks.

    There might be for some kinds of texts, where the automatic algorithm got it wrong and was manually corrected (Lewis Carroll poetry: 'Twas brillig ...").
    The Online Help (InDesign Help | Find/Change) tells you can use ^' and ^" to search for straight single and double quotes exclusively. Putting a single ' or " in the Change To field will tell ID to replace it with the automatic curly form, and to change to any specific Open or Close form, use any of ^[ ^] ^{ ^}

  • Find(String pkey) method returns multiple object of the same row

    I'm not quite sure what i've done or havent done, but I've implemented updating a row using the em.persist(Object) method.....works great, but after i did that a few times the find(String pkey) method returns multiple copies of 1 row in the db
    here are two rows in the db
    personid(PK) firstName lastName
    1234 joe jones
    2345 rachel jones
    when i execute any query looking for people with the last name jones, ie
    select object(p) from Person p where p.lastName='jones'
    it returns multiple objects of each row ie
    1234 joe jones
    1234 joe jones
    1234 joe jones
    1234 joe jones
    2345 rachel jones
    2345 rachel jones
    2345 rachel jones
    2345 rachel jones
    There is only one row for both rachel and joe in the db, but why is the entity manager returning multiple objects of each, and how do i prevent that without using DISTINCT?
    Thanks for the help in advance

    Sorry, i forgot to mention i'm using ejb 3 and jboss

  • Finding string in the 'z' programs.,..

    hello experts,
    i want  to find the 'tables' string in all created 'z' programs.
    output wll look like..
    zprogram name
    Total Count
    z0mara
    1
    how do i do that???

    Hiii Saurabh...
    1)  Execute SAP report RPR_ABAP_SOURCE_SCAN in SE38.
    2) Give Z*. in program name.
    3) Give tables in  Find string Options.
    4) Execute it.
    You will see all ztables whereever this tables string exist.
    Reward Points.

  • Grep to find first occurrence of a particular word in a story

    Hello Grepers
    I haven't had luck working out a Grep to find first / last occurrence of a particular word in a story.
    To find the first occurrence of the word hello in a paragraph I would use this grep.
    (Hello(?!=Hello*$))
    For the last this works.
    ((?=Hello(?=.*Hello)))|(Hello(?!=Hello*$))
    I have tried single line and multiline prefixes but they don't do the trick.
    Waiting in suspence,
    Trevor

    Hi Marc,
    Thanks for your reply, I'm glad you got my subtle hints.
    1) First Hello in the paragraph(s)
    Marc Autret wrote:
    Also, it seems to me that the GREP patterns you've posted are wrong and only work by accident. For example:
    (Hello(?!=Hello*$))
    actually means: find 'Hello' if and only if the match is not followed by '=Hell' and 'o' zero or more times and an EOL.
    Well Marc I made a Hell of a mistake!!!
    I meant to write (Hello(?!=Hello.*$)) with a dot there which at least is not quite as stupid if not more correct.
    In fact both (Hello(?!=$)) without a . and Hello(?!=^) work, well sort of work for the first Hello of the paragraph(s) depending on the were one start the search from (before the first Hello works otherwise it will find the next "first" Hello of the paragraph.
    I said sort of because I naively presumed that GREP styles would work like GREPS, dumb hey.
    I was really looking to use these GREPS in GREP styles, well you can't.
    In a GREP style
    (Hello(?!=$)) or any of its variants will apply the style to all occurrences of Hello in the paragraph.
    I can partially circumvent this problem by adding a second GREP STYLE which applies an anti style to all words after the first Hello (?<=Hello).*
    i.e. I have a want my first Hello to be bolded then set the first style for bold and the second to regular.
    This however is not practical if one wants to auto style more than one word in this way in other words to do the same for the first Hi and the first Hello in the paragraph.
    As a regular GREP solution providing that one starts the GREP search before the first occurrence of Hello It will work.
    2 & 4) First and Last Hello in the story
    Again these GREPs don't work using GREP styles, this I think is because GREP paragraph styles only look within the one paragraph at a time they are applied to.  So they can't look at the preceding or following paragraphs to see if they contain Hello or not.
    If I am correct I see no work around to this and am will to pay 10 Pounds, Euros or Dollars to whoever comes up with a non-script fully functional  GREP styles solution for this (I think my money's safe)
    Regarding the regular non styled GREPs they nearly work as stated.
    When (?s)(Hello)(?!.*?\1) is used to find the last occurrence of Hello in the story, if the find tab is used it will firstly find the last Hello of the story then it will go back and find the one before that!! then it will go onto the next story.
    Using the GREP in script works as stated.
    The easiest way of course to find the first and last Hello in a story, document etc. by script would be
    app.findGrepPreferences.findWhat = Hello"
    myFinds = myWhatEver.findGrep();
    First occurrence   myFinds[0], last occurrence   myFinds[-1].
    HOWEVER NOT PARTICULARLY EFFICIENT!
    3) Last occurrence  of Hello in paragraph.
    This one works perfectly both with regular GREPS and GREP styles.
    In summary
    GREP STYLES: only the (Hello)(?!.*?\1) last Hello in the paragraph GREP works.
    GREP FIND TAB: the first Hello in the paragraph GREP finds the first Hello after the cursor, the first in the story works in the limited way as written, last in story has the problem of finding the second last Hello after finding the last Hello, Last in paragraph works flawlessly.
    GREP SCRIPTING: all work without problem except for the first Hello in the story that has the problem of needing to extract the last 5 letters which for my automatic text / GREP changer is a bit of a problem but for general scripting would not be problematic.
    Once again Marc thanks for your input, I doubt there's much if anything  to add on the topic maybe Laurent Tournie from indigrep.com might have some ideas.  I don't know his contact details so if you think it's a good idea please can you send him a tweet / mail.
    Regards
    Trevor

  • Rename finder item withouth user to choose find string.

    Hi,
    I've built an automator workflow in wich I create a standard folder /w subfolders. Automator then renames the folders, by rename finder item with replace text.
    The new name is a projectname an user can give in. But I don't want the user to change the find string. Is there a way to work this out?
    I've tried to do an ask for text, but I don't know to how I can put the result into the replace field?
    Thx,
    Marlon
    Powerbook G4 (1Ghz)   Mac OS X (10.3)  

    I figured out a way to use variables in the Rename Finder Items.
    In my case I want to rename the files to a sequential name. I can't link the variable to the "New Name" box in the Automater GUI.
    But it helps to know that that the Automator is just creating an XML file and you can edit this directly.
    To do this, create the Automator workflow and save it. Give the variable some distinct name like "myVariable".
    In Finder, right click the Automator file and select Show Package Contents. Within this folder go to Contents and find the document.wflow file. This is the XML file, so open it with TextEdit or something.
    Search the file for your variable name. The first instance of it should be in a section that starts with <key>variables</key>. All the variables will be listed here. Each variable has several lines to define it. The first will be the UUID. The UUID will have a line that is something like: <string>BD464B7A-ACDE-4A63-B595-FAF1DA6DE26E</string>. The BD464B7A-ACDE-4A63-B595-FAF1DA6DE26E is how Automator refers to your variable. Search the file for this UUID string and you will see. Whenever Automator wants to insert the variable, it will enter $(BD464B7A-ACDE-4A63-B595-FAF1DA6DE26E).
    Copy this string, with the $() surrounding it. Close the wflow file. Now you can go back to Automator itself and paste it wherever you want your variable to appear, even if you can't normally insert the variable into that field.

  • Grep to find any word NOT in quotes

    Hi
    Can someone help me with this grep
    I need to find all words that are NOT in quotation makrs
    For example:
    Hello and "Good Morning"
    I would want to find the words:
         Hello
         and
    but not the words:
         Good
         Morning
    I tried with lookahead and lookbehind like this:
    (?!=")\w+(?!")
    but it just selects one character less
    If anyone can help I'd really appreciate it
    Thanks in advance
    Davey

    Hey guys!
    Thanks a lot for your help!
    @Beginner_X
         Your first grep was almost perfect, however, it didnt find the first word of a story (since it didnt follow a space or a return)
         Your second post worked perfectly!! - Thanks a lot
    @csm_phil
         I was looking to select each word separately, not consecutive words - although this will also come in handy
         Your grep worked, however I had to add the question mark to make it ungreedy
         because if the sentence had 2 quoted words, it would select from the beginning of the line till the last quote
    @Laubender
         For some reason your grep is functioning just like mine - it finds the word Good and Morning
    Thanks again
    Davey

  • Grep that finds curly quotes and changes to straight ones, but only after digits....

    Hello
    I am trying to find all the curly quotes that follow numbers and turn them into straight quotes.
    I am going to try and put this in a GREP style eventually, but in the meantime, I was testing it with find and change.
    Here is what I did......but it doesn't work.
    For the Find what- I did a positive look behind to find a digit and then pasted in the curly quote
    Fort the change to-I found the Unicode value for the straight quote.
    But it didn't work ;-(
    any thoughts out there!!
    babs

    Well, I'm no Engineer, and I suppose it would require all the font
    manufacturers to rebuild the fonts to handle it the same as small
    No...given that All Caps, is handled by InDesign without special
    font support, this feature could work the same way. A Character
    panel option (like All Caps) that Forces Straight Quotes.
    Or maybe that was your point. (?)
    It can certainly be done.
    Question is merely whether it should be done.
    But how much worse can it get than all those airplanes falling from the sky
    How could you ask such a thing? Surely having the entire universe
    sucked into a rift and enveloped in eternal blackness without sunshine,
    light, or heat is far worse than a few aluminum chassis falling into the
    ocean and there being no power grid to run InDesign unless you purchased
    the hand-crank version!

Maybe you are looking for

  • Power supply dead? Can I get at the Hard drive?

    I recently had a storm which blew one of my external firewire drives (it goes on but won't mount) and when I tried using my older G4 (Quicksilver, with OS10.3.9, and Classic) to boot up in OS9 and try my Norton Utilities, the G4 froze. It did it seve

  • The Plague of the Disconnecting Xsan

    I am living in Xsan H.e.l.l. I pray someone can save me from this torture. Anyways, here is the situation: I've been working on trying to make an xsan work for over 6 months now. The latest problem is I am getting constant disconnects when accessing

  • Store file as Self-Contained QT or not?

    I have many videos that have been edited with a lower 3rd added. I am not sure if the final delivery of this will be via DVD or the web. This decision may not come for many months. I need to save these files in a way that will make it as easy as poss

  • Front row freezes up

    Every time i try to open a itunes playlist or any music in front row it freezes the whole computer up. What is the problem?

  • Query on vCloud Usage Meter Reporting

    Hello , Can vCloud Usage Meter provide report of  vCpu  , vRam  &  Storage Consumption  on monthly basics for each individual  vCloud Workload (Virtual Machine )  ? I am looking for   Monthly report of  vCpu/ RAM & Storage  utilization by each  Indiv