GREP glyph find by CID/GID

Using GREP, I can find glyphs by unicode value with this expression:
     \x{2022}
Is there a similar GREP expression to find glyphs by CID/GID value?
For example: I am using Poetica with alternates for the bullet character (unicode 2022). Each alternate has a CID/GID vale of 1050-1062
In a paragraph style I'm tring to apply a character style to each of 12 alternates. Something like:
     apply style 1050  to text  \CID{1050}
     or
     apply style 1050  to text  \x{2022}\CID{1050}
I realize I can just make a font, and probly will, but I was just wondering if it's possible.
Thanks,
Cam

No, the only way of using GIDs is with the Find/Change Glyph field in the Find dialog. And then it's the *only* option -- change one glyph to an other, nothing more, nothing less.
Only way of doing it "smarter" I can think of is building thse parts of your file as InDesign Tagged Text -- export a portion of your formatted text to Tagged Text to see what this it looks like.

Similar Messages

  • 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

  • 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

  • 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 to find double dot

    Hi,
    Any one can help me to find double dot in a indesign document.
    It should not catch triple dot(...) and six dots(......) match

    Here's a screen shot:
    I colored single dots blue, and the single-character ellipsis red. I've placed them in several combinations. When I run the GREP, here's what it finds:
    As you can see, it only found the single dots, and not the ellipses. Are you saying that you have actual ellipses and single dots, but it isn't finding the single dots when they are after an ellipsis?

  • GREP to find single character

    I put together a GREP style inside of a paragraph style that is supposed to find all instances in the paragraph where there is one single character inside of parethesis. This is what I typed in:
    (?<=\().(?-\))
    and I assigned a character style that is supposed to change the character inside the parenthesis, but not the parenthesis themselves.
    But it's not working. Can anyone help me with how to fix it?

    For any other readers greppling with same,
    (?<=\().(?=\))
    [Breakdown:
    (?<=x) Lookbehind string x
    \(  .. which is an open parenthesis -- escaped, because it's a GREP special character
    .  Any character. Any at all! Imagine that!
    (?=y) Lookahead string y
    \)  .. which is a closing parenthesis -- see above]

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

  • 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

  • Using grep to find one match per line

    Hi,
    How do you get grep to return a single line even when multiple matches are found on the same line?
    I tried the (?-m) and (?-s) without success.
    eg. searching for the string "sin" in the following line should return only one result not 2.
    SG SIN Singapore
    I don't want the search to stop after a single match, it should continue on successive lines
    Thanks,
    SB

    Sure. Let GREP find an entire line at once:<br /><br />>^.*sin.*$<br /><br />But it won't work, I'm afraid. You insist that looking for "sin" <br />i will find <br />a match in "SG SIN Singapore"; and not one but two. It won't. Try it.<br /><br /><pre> __<br />(..)<br /> _\</pre><br />Got that? So use the 'case insensitive' switch<br /><br />>(?i)^.*sin.*$<br /><br />or (perhaps better, in this case), as you seem to search for the three letter codes, use<br /><br />>^.*\<SIN\>.*$

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

  • GREP STYLE, find/change

    Hi!
    My problem is..
    I got these numbers:
    17
    31.9
    32.9
    15
    in a table/cells. They need to have an .00 and 0 like this:
    17.00
    31.90
    32.90
    15.00
    I can use this one for that: find: .$  change: $0.00 but then the numbers with 31.9 gets the .00 also.. 31.9.00
    Any grep styles for that? multiple functions in the same style`?

    A grep style can't change text for you; it can only apply a style to text that matches whatever pattern you set.
    I don't think there any one search/replace that will get you where you want to go, but I was able to do it using two search and replace strings:
    ^\d+(?!\.)\b
    $0.00
    Finds any number of digits at the beginning of a line, that does NOT have a period following it, and returns the same number with ".00" appended.
    ^\d+\.\d\b
    $00
    Finds the remaining instances that have a period and only one digit after it, replaces it with the found text with "0" appended.
    This will not touch anything that has a number that has two digits after the period, like 12.95.
    Give it a try on a copy of your document, see if it does what you need. Depending on how your document is set up, and what other text is in it, you might also want to highlight the table (or just the relevant columns) and restrict the search to the selection rather than the whole document.

  • Text or Grep in Find.change script by list?

    Would like to use the grep formating in this query (instead of text) but the script shows error:
    text {findWhat:" )"} {changeTo:")"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
    Why here coexist two ways of writing?
    How to decide?

    @Laurent: heh heh. After that long story I was still paying attention to the original question...
    Mariana:
    ... as this can combine more characters in a search, for example finding space before point, period, semicolon, etc. Or space after ( or before)...
    Yes, that's possible with GREP. Try this for the first one:
    grep {findWhat:" ([.,:;])"} {changeTo:"$1"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Remove space before period et al.
    (Remember the script needs TABS between the sections, as in the original file.)
    This one is a bit challenging. Actually, the period is a special character in GREp (it stands for "any character"), so normally you would need to escape it:
    (space)\.
    to search for a space followed by a period. However, the square brackets [...] define an OR group, and that removes the magic properties from the period. Apparently, there is no use for a wildcard character in an OR group! (That would be something like, "The following characters are allowed: a comma, a colon, any at all, a semi-colon ...")
    There is a more advanced way to remove spaces like these. You want to look for spaces which are followed by any of these characters, and replace them with nothing. That would be
    {findWhat:" (?=[.,:;])"} {changeTo:""}
    You can try this in the interface to see it works.
    The second can be done using the Unicode value for an ellipsis ("\x{2026}" -- another notation than in the regular Text find), or with the special escape code "~e". Yup -- there is another escape character. The backslash is used by GREP itself, but GREP does not understand InDesign's own special characters -- page breaks, smart single and double quotes, Indent-To-Here, em dashes, and a few others. They can also be inserted from the menu on the right side of the Find field. These characters need a tilde, so InDesign can "translate" them internally to something GREP can use, and GREP never sees them. Since the tilde is nothing special for Javascript, you can safely insert only one in the script data file ...
    To remove a space before or after an ellipsis, you could use this:
    grep {findWhat:" ?~e ?"} {changeTo:"~e"}
    ... but in this case it may again be simpler to stick to regular text mode (where you would use "^e" for the ellipsis, by the way).

  • GREP to Find Numbers at End of Story

    I want use GREP to do a find to locate any six digit number or just the numeral zero at the end of each story in my InDesign 4 documents.
    So far, I have ben able io identify six digit numbers by searching for the following \d{6} But when I add the end of story location marker,  \z\d{6}, no results are returned.
    What do I need to do to:
    1. get the expression to search for the number at the end of the story
    2. amend my expression so that it finds either a six digit number or the numeral zero
    Any help on this would be appreciated

    kmc27 wrote:
    In the InDesign document here isn't the six digit number in the first example and the zero in the second example at the end of the story? Wouldn't \z find these numbers?
    No, to both questions.
    \Z is a location marker, and it only matches the position "end of story". You have a hard return between the digits and the location 'end of story'.
    This will work in your example document:
    (\d{6}|0)\r\Z
    and it would be wise, in your case, to mark the hard returns as 'optional':
    (\d{6}|0)\r*\Z

  • GREP not find in cells

    A bit of a problem here
    Name
    Surname
    Company
    Website
    www.none.com
    www.aaaaaaaaaaaaaaa.com
    none
    n/a
    no website yet
    www.abcdefghi.com
    N/A
    none
    etc.
    I have a table like this, it has 372 columns.
    In the website column there are web addresses. But in some entries people have filled in different things.
    How can I find just the text that doesn't start with a URL
    I want to find
    none
    n/a
    no website yet
    and so on
    So those cells are blank
    Basically want the search to ignore any entry that has "www." in it?

    That's great guys, thanks. I'll give them a go later on today.
    These are entries filled out by members, who I would think wouldn't put "http" into their website. I think most of them are www.whatever.comm
    But I did find one that had just ".website.com"
    I think just getting the www part is enough and then whatever text comes after that.
    So as long as I'm not starting any cell with www that is enough.
    There were some entries in the list that had "Being Developed at the Moment" and other things. I should really talk to IT about putting in validators for website and email addresses so the entry in the list has to be a website or email.
    I'll have a similar jobby to do with the emails too, but I think I'll try figure that one out based on the GREP info here.If I get stuck I'll be back
    Thanks

Maybe you are looking for

  • Delivery Incompletion procedure  - CustomTAB - Cursor control

    We have defined a new tab in delivery at item level and we have some custom fields on that new screen. This new screen is working ok. We also have made one of this new field as part of our incompletion procedure.  Scenario is like this: 1. We do not

  • Delete entries from internal table

    Hello friends,                     I have a screen on which im displaying a table, now i have also provided an delete button which deletes the selected record.                   the record which i have written is GET CURSOR FIELD FLD LINE IND.   READ

  • XML data output in a custom grid table

    Hi! I was wondering if it is possible to display xml data output in a custom-made grid table? Important is the ability to arrange the fields on the grid layout (not a fixed layout with columns and rows). I am using the latest JDeveloper release. Than

  • Right clicking causes WindowServer hang

    Hi there, I'm running an nVidia GTX 285 and a GT 120 in my 2008 Mac Pro, with 32GB RAM and a RAID 0 setup. Lately, on my third screen solely powered by the GT 120, right-clicking has caused a brief flash of white (usually a square the same size as th

  • ITunes Wont Detect iPad Tried Everything!!!

    Here's what I've done over the past 2 days to get where I am now. 1) factory reset my computer completely wiped all files and cleared the hard drive. 2) downloaded iTunes 3) updated iPad to newest software (iPad worked perfect) 4) factory reset iPad