IDCS5/MAC - Style GREP in capital letters of a letter after a hyphen between the words

G ' Day here.

I'm trying to create a GREP style for uppercase letter after a hyphen between the words, specifically with a word beginning with a capital and after a dash do not for example Lorem-ipsum = Lorem -Ipsum

The full story, it's that there is an indesign batch file used over and over again that family names that are in a large database of data - merge. Data arrives in capital letters and our mail barcoding software allows us to title case some fields, but the behavior of title case has the following results:

* = Mcleod McLeod

* = Agostino Agostino

* Smith-Bunting = Smith-Bunting

I was able to solve the = problem with the following GREP style Mcleod McLeod:

(?<=Mc)\l

and then apply a character style that is nothing more than all caps.

Similarly, I was able to solve the problem = D'Agostino of Agostino:

(?<=\u')\l

and once more apply style all uppercase to the letter assigned. This also solves the problem of O 'leary to o' Leary.

However, when I try these GREPs to enter style Bunting-Smith questions:

(?<=\u\l+?-)\l     or   (?<=\u\l{2,}-)\l

the search does not work, nor will it work with regular replacement of find/change GREP... and yet the expression \u\l+?-\l will find the block I'm after.

I could use the search

(?<=\l-)\l

and is that Smit untingh-b= Smith-Bunting... but there is also co-ontervenir = co-Ontervenir (find two words with a hyphen but begins with a lowercase letter).

That's fine if the paragraph style is applied to the line in the address block containing the name of the client, but if the name is mentioned in a text block, then that block of text must have the paragraph with the GREP style applied style and dashes between words in that para is in the same way as the name.

Yes, it is possible to go into excel and use the PROPER (cell affected) = and fix fields Smith-Bunting, but I am trying to create a solution that only works in InDesign so that other operators in the office (who are not familiar with excel) can simply open the file of commands and dump in the database to txt generated by the mail bar coding software.

There are other names that-case of barcoding mail title fault upward, i.e.

* = Macleod MacLeod

* van der Graaf = Van Der Graaf

* van Diemen = Van Diemen

but a GREP make MacLeod of Macleod can clog Mack, Mackie or Macy become MacK, MacKie or MacY.

I also know that a GREP for the van der or van will not work as the style will force letters only to be all uppercase, not uppercase to lower...

In the end...

does anyone know how to style GREP (not a find/change GREP) a fix for Xxxxx-xxxxx = Xxxxx-Xxxxx?

Colly

Colecandoo.

I agree with Haakenlid on his reviews of Dirty-workaround - in my opinion, the data should be entered in the way which it oguht, not altered by some magical GREP styles - but then again, I can also sympathize with your POV re: a fire-and-forget solution even your stupidest operator can not miss.

Oh the rigors of life.

If you are totally, absolutely certain you want to GREP for that, use this:

b define a character to capitals on the chain style

\b\u\l+\-\l

-This will change as if by magic "the Honourable lieutenant Sir John Forsythe Blunt-object" in "BLUNT object".

(b) then replace (!) the first half with another style of character that removes the attribute of capitals (!):

\b\u\l+-(?=\l)

Notice how this expression is exactly the same as the one above, except for the latest code - the next tiny need also be captured, but now, by using an advanced search for its formatting will be not affected.

This command removes the substitution all uppercase the first halve, change 'BLUNT-object' 'Blunt-object '.

Many side effects, I'm sure. Maybe it 's safer to teach your operators to run a single script.

Tags: InDesign

Similar Questions

  • GREP text between the words selection

    I want to select all of the text between [2a] and [F2A].

    The problem is that there are n paragraph between the 2 elements as in the following example:

    [2A]

    Lorem ipsum dolor sit amet.

    [ME] Lorem ipsum dolor sit amet.

    [KING] Lorem ipsum dolor sit amet.

    [F2A]

    I tried:

    (\[2A\]).+(\[F2A\])

    But there may be more than one error in my code. Any suggestion?

    Put "(?s)" at the beginning of your GREP for force "single-line" mode. "

    By default, GREP only works on a single paragraph, and so it stops when it encounters a hard return to the research. Simple line of setting mode allows to treat the hard return as any regular character.

    You can change the "." + "in the middle of your expression to. + ? ", to match the shortest chain possible. Default value is GREP catch as much as possible, so if you have more than once these codes in a text, it will happily select everything from the first to the last instance.

  • An involuntary repetition of Style GREP

    I use the GREP style

    ^.+?\. ( ? = \s\u)

    to identify the text at the beginning of a paragraph, then apply a character specific to this text style. The formatting of GREP should occur only once at the beginning of the InDesign copy block. Where I am running into trouble is when I change the text using a hard or soft return, the GREP style repeats, which is not what I want to happen. I need to be able to return without the repetition of the GREP style itelf. Here's a screenshot for example.

    Highlight the GREP style in the paragraph and then Style Editor by clicking the dropdown to the right of the code will display a menu that includes options for ordering repeat, as "Zero or once", but even if that is selected, the style GREP is repeated.

    Is there a way to apply the style just GREP once by InDesign story, so that any subsequent conditional or unconditional return do not call style GREP a second time?

    kmc27 wrote:

    I was using a regular nested style "the first sentence" option, but it was not sufficient in cases where the sentence contained a description containing two periods such que.5 carat t.w.. That's why I switched to a GREP style.

    I understand the style GREP repeats when is used a hard return, but why is it repeated when a soft return is used. The return is not the creation of a new paragraph.

    We could call it "interpretation". Is a soft return creates "new paragraph"? Well, Yes and no. Soft returns are abused to insert line breaks in the text running, and I'm sure that's not the intended use. Something like a first line indent is not achieved with a soft line break.

    I think the explanation is simple, however. GREP, in general, is not aware of the difference between a hard return (0x0D) and a soft return (0x0A). This is expected behavior, because different OS platforms save their 'plain text' with different line endings, and original function of GREP was looking in plain text only. It is imaginable the behavior you see is a side effect of the programmers of Adobe not realizing this (they has no real 'write' GREP for InDesign code, they have downloaded from somewhere).

    That said: one of the most special things of a GREP style which needs to be "completely intentional" is that they work only inside a whole paragraph. Therefore, you can not do something like 'test the previous paragraph for x' - ID refuses riding on the mandatory return. But: the paragraph to which it is applied is an InDesign paragraph, hard back in the mandatory return, and this mechanism does not take account of GREP 'we include the return. " Thus, strangely, strangely and oddly enough, it does not work:

    ^(?

    as "before" the beginning of a paragraph InDesign never can be a soft return (there always 'nothing' before it), but "before" the beginning of a paragraph GREP, there's something--a return!

  • How to get to GREP change all the words in capital letters to capitalize each word

    I'm working on a page 100 ePUB + and I need to change the titles of 20 chapter of capital letters only to capitalize every word in the title. Most of the chapter titles begin with a digit, but some are pure text. The chapter titles all use the same paragraph style.

    For example: 4 THE HERE AND NOW should be changed to 4. The here and now

    For example: EPILOGUE must be changed to epilogue

    I can't GREP to do this in the window search/replace suddenly? (I don't see anything in the change to: field that allows me to convert it to.)

    -Thanks for any help on this.

    Hi Peter,.

    Change_Case_With_Style.jsx, original screenplay written by Thomas Silkjær.

    Modified by Bruno Herfst in 2011 by adding new features: find a style, expression GREP and cancel.

    See: Novelty/Change_Case_With_Style.jsx at master · GitBruno/novelty · GitHub

  • Help: How to fix a line in this script (well almost) on the change of the actual text capital LETTERS?

    app.findGrepPreferences = null;

    app.findGrepPreferences.findWhat = "\\l\\l+";

    app.activeDocument.characterStyles.item ("SC");

    foundList = app.activeDocument.findGrep (true);

    for (i = 0; i < foundList.length; i ++)

    foundList [i] .changecase (ChangecaseMode.UPPERCASE);

    The idea is to choose the magenta words in salt to be set in uppercase.

    The problem is the script (based in Jongware and P. Kahrel) is to convert all the texts for no capital letters not assuming that the condition to the style of characters 'SC'.

    Instead, it evolves throughout the text:

    upper.jpg

    Try:

    app.findGrepPreferences.appliedCharacterStyle = app.activeDocument.characterStyles.item ("SC");

    * not tested

  • MacPrO _ randomly typing in capital letters...

    Help! My keyboard randomly generates capital letters. The keys are all move freely, no friction. Ideas?

    You have restarted your computer?

  • Cannot change in capital letters, numbers and punctuation in mode of handwriting on the rotor.

    When using my phone with the rotor on writing, I am able to change the settings in capital letters, numbers and punctuation by sliding 3 fingers down vertically, however I can't get it to work on the iPad. Can anyone help please?

    If you use two VoiceOver and zoom in on your iPad, try to temporarily disable the zoom. I found that I can not change handwriting options when the zoom and VO are enabled.  -AJ

  • Tecra Z50 - A - 11 c: without capital letters when shift caps lock is enabled

    Hello

    I have a laptop Toshiba Tecra Z50 - A - 11 c with 3.70 BIOS...

    I noticed a strange problem with my laptop. Occasionally, when the CAPS LOCK is turned on, I can not write in capital letters when it is off, I can write in capital letters. I couldn't find the thing to replicate.

    Is there someone with a similar problem?
    What could be the problem?

    Thank you.

    The keyboard should work as follows:

    SHIFT CAPS LOCK is enabled-> uppercase
    SHIFT CAPS LOCK is on and down SHIFT-> small initial letters
    SHIFT key-> uppercase

    If this isn't the case, test the external USB keyboard.
    The use of the external USB keyboard can be useful to find out if the internal keyboard is malfunctioning.

  • I can't type capital letters c, d, e and the sign of the pond (think they are right?) using a shift key. I can type these letters if I use the caps lock. Do I need a new keyboard?

    I can't type capital letters c, d, e and the sign of the pond (think they are right?) using a shift key. I can type these letters if I use the caps lock. Do I need a new keyboard?

    Optionally, before buying a new property you can try to give you a good cleaning.  They are pretty easy to disassemble and reassembe, all you need is a screwdriver

  • Capital letters on Officejet 4500 Wireless keyboard

    How to set caps on my HP Officejet 4500 Wireless keyboard?  There is no shift key but I need capital letters for my wireless password.  Thank you.

    I think that if you continue to press the same key again and again, she will be capitals and other characters.

  • Cannot type in capital letters when you use the SHIFT key

    Hello

    I had this problem with my keyboard this morning. Can I use the SHIFT key to type all in capital letters except for the letters e q you are I p o z x c v Mr. keys for letters work fine, but when I press shift to enter the capital, nothing happens. as if they do not work! But they work because I can type perfectly well when not to use the SHIFT key pressed. I don't know what has caused this that has not installed a new software. except a windows update a week ago, but he was fine until this morning

    It's really annoying :( And sorry if this is the wrong place to ask for advice

    Anoop thanks! I have not tried method 1, but I tried 2 & 3 and they were not very useful. But now the problem seems to have been fixed on its own. No idea what caused or how he resolved, but my keyboard works perfectly fine now :) And btw I have not install or change anything with my PC during this period, before and after this issue.

  • Stuck in capital letters

    I'm stuck in capital letters. I can't follow the recommended solution

    doesn't look like you're stuck.

    you have not explained what "recommended" you tried to follow, is anyone's guess.

  • It is changed only capital letters

    because every time I write something declares a variable no matter what everything in capital letters?, where you change this property?

    Preferences

  • How can I identify all the words in capital letters and change to initcaps?

    Hello

    I'm using Oracle 11.g

    I have a table with multiple textual data varchar2 columns.  There are several words that are all uppercase.  In all cases, these capital words should be replaced by different cases (for example, HELLO Hello).  How find the capitalized words in all the lines and change them to mixed-case?

    Thanks for your help.

    The rownum in your update statement is probably taken as the virtual rownum http://docs.oracle.com/cd/E11882_01/server.112/e41084/pseudocolumns009.htm#SQLRF00255

    This is probably the reason why the script compiles, but the update does not work as there is no column named rownum in your table (even if it exists, rename it as is among the reserved words http://docs.oracle.com/cd/E11882_01/server.112/e41084/ap_keywd001.htm#SQLRF55621)

    trying to avoid loops to the extent possible, that I see it more as

    CREATE TABLE 'LITURGY_READING_COPY' ("ROW_ID" NUMBER NOT NULL ACTIVATE, VARCHAR2 (4000) 'TEXT')

    Table created.

    insert into liturgy_reading_copy

    Select 1, ' a reading from the letter of Saint PAUL to the Romans: BROTHERS and SŒURS: everything that has been written above... ". »

    of all the double union

    Select 2, "another text, less HOLY inspiration, containing all the WORDS in capital LETTERS

    of the double

    2 inserted rows.

    ROW_ID TEXT
    1 A reading from the letter of Saint PAUL to the Romans: BROTHERS and SŒURS: everything that has been written above...
    2 Another text, at least the HOLY inspiration, containing all the WORDS in capital LETTERS

    merge into liturgy_reading_copy lrc

    using (with

    init_capitalizer (RID, CBC, res) as

    (select row_id,

    substr (text, instr (text,' ') + 1) | '  ',

    -case when substr (text, 1, instr (text,' ')) = upper (substr (text, 1, instr (text,' ')))

    then initcap (substr (text, 1, instr (text,' ')))

    of another substr (text, 1, instr (text,' '))

    end

    of liturgy_reading_copy

    Union of all the

    Select RID.

    substr (src, instr (CBC,' ') + 1) | ' ',

    RES | -case when substr (src, 1, instr (CBC,' ')) = upper (substr (src, 1, instr (CBC,' ')))

    then initcap (substr (src, 1, instr (CBC,' ')))

    of another substr (src, 1, instr (CBC,' '))

    end

    of init_capitalizer

    where rtrim (src) is not null

    )

    Select RID, res

    of init_capitalizer

    where rtrim (src) is null

    ) ic

    on (lrc.row_id = ic.rid)

    when matched

    then update

    text = ic.res

    Statement processed.

    ROW_ID TEXT
    1 A reading from the letter of Saint Paul to the Romans: siblings: everything that has been written above...
    2 Another text, less Holy inspiration containing all the words in capital letters

    Concerning

    Etbin

  • 4.0.2 Oracle sql developer - capital letters for keywords

    Hello

    I want that key words turn to capital letters, even when I write in lowercase letters.

    for example:

    SELECT *.

    DE PEM

    WHERE work = "manager";

    Thanks in advance

    Elad

    You can set that in the preferences
    http://www.thatjeffsmith.com/archive/2012/12/formatting-keywords-to-uppercase-in-Oracle-SQL-Developer/

Maybe you are looking for

  • Windows XP Edition Media Center key also works for XP Home Edition?

    Hi all We had a laptop (A-100), which WinXP MCE is installed. Also, we do not have a restore CD.Now I want to format C: and re - install Windows - but I have a windows xp home edition Setup CD. So my question is: * Fact (legal!) Key XP MCE does work

  • Failed to load IE google chrome or firefox

    Hello my os is xp home edition, I tried to make a start via the diagnostic mode and I could not return to normal startup mode and another problem raised out of that is the DNS look by failure not capable of raising of IE, FIREFOX or GOOGLE CHROME som

  • How to recover the default games in Windows XP

    I accidentally deleted the games that come with Windows XP.  Is it possible to recover.  I don't have a CD more.

  • HOW TO OPEN A NEW FOLDER ON DESKTOP PHOTOS & MISSING FILE DOCUMENTS

    I created a new folder on the desktop storage of photos of the documents"" folder.  When I try to open the folder, I wonder "what program I want to use.  should what program I use? also, the pictures I've selected appear is in the documents folder. 

  • Monitor does not immediately turn on

    My monitor used to work properly and then, after going to sleep when not to use the computer for a given period, he (the monitor) would not go back. Pressing Ctrl-Alt-Del has worked for a short while then I had to turn on the monitor and turn it back