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.

Tags: InDesign

Similar Questions

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

  • Words without spaces between the words or phrases as one continuous Word. That's happened?

    To give you an example of what I'm talking about, here goes:

    Ihavebeentypingwithnospacingtogiveyoualookatwhatitisdoing.Thespacebarwillnotworkinplacingspaces, either.

    That's what my friend had with his computer.  She must place an (/) between the words in order to show him a break in the words.  Anyone who already has this experience and have a solution?

    Hi JudyBriles,

    1. This only happens when you type in a particular application?

    2. you remember to make changes to the computer recently?

    3. what type of keyboard you use?

    Step 1:

    You can try to use a different keyboard and check if the space bar works.

    Step 2:

    You can also check in the new account of user if the problem occurs.

    How to create and configure user accounts in Windows XP

    http://support.Microsoft.com/kb/279783

    Hope this information is useful.

  • Spread the word selected in the e-mail application regarding

    Hey, I have a question about how to get the word selected in the mail application. My application needs to get the word selected out of my request and pass it to the application. Thank you!

    There is no published API that will give you what I know.  I think you have two options:

    (a) tell the user to make a "copy" before calling your ApplictionMenu.  You can check there is something in the Clipboard and displays to confirm that it was what they intended.  That's what I would do, because it is safe and supported.

    (b) in your ApplicationMenu, you can possibly find and copy yourself him are selected as follows:

    Field currentField = UiApplication.getUiApplication () .getActiveScreen () .getLeafWithFocus ();

    If (currentField instanceof ActiveRichTextField) {}

    ARTF = currentField (ActiveRichTextField);

    artf.selectionCopy (.);

    }

    Note that I have NOT tried or even compiled this code, and if can be that the field is not an ActiveRichTextField, and you should probably also check that the field is selectable and/or the selection can be copied before you do it anyway.

  • Find the space between the word with different endings and figures

    Hello

    I am trying to find a way to find spaces between the words and numbers.

    Screen Shot 2014-02-11 at 13.12.34.png

    I'm limited to only use the word "WORD" (capital or small capitals) with different endings like - ing s y and more (using \S+).

    I wrote something like (? i) (? < = WORD\S +) \s(?=\d+) but this does not work due to some limitations of advanced search, I think?

    Any suggestions?

    Peter

    On the other hand, I think that.

  • When I type messages in social networking applications I can not get switched between the words or the cursier of this specific word that I want to continue

    When I type the message in other applications, I can't acess between word assume you that I typed the word syped instead of type in a paragraph, and I want that this word must be corrected impossible to go to this place it shows just the option {select, select all... etc} please help? / / /

    You use the keyboard as a trackpad- http://www.imore.com/how-use-keyboard-trackpad-iphone-6s

  • 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

  • Text of the word IDCS4 cannot capture (defining poetry...)

    I see books on poetry and the approval of the withdrawal right a few words.

    Many lines is normal (between the left edge) but others are aligned on the right side.

    This text comes from Word with hyphens but no style is present at all.

    The 'normal' lines show 0 values in the fields (0 left indentation, withdrawal of 1st line o, etc.)

    Special lines are always showing a withdrawal from front-line between 50-70 mm (they change in each poem)

    If I apply a style all the formatting is lost.

    And I can't look at the find/replace indented lines because ALL values change.

    But these special lines are marked in some way. They are the only ones that are indented.

    I want to characterize them.

    Is it possible?

    Hi Mariana (not a not post here before? "I see '1 messages'?)

    Yes, it's a common problem. You want to apply your styles, but you can't because it would remove the formatting that you want to keep. Generally, concerning than fat, italic and similar, but every now and then something else pops up.

    You want to apply the same style to each of these lines and with just the preserved dash? I'm thinking "script opportunity" here.

    There are, it seems, two ways to handle this with a script. The simplest is to 'save' the indent, apply the correct style, then put the value of back withdrawal - what makes a style "Style +»

    Another way is to make a new style for each line, "based on" the right style, but with the dash on the right values for this line.

    (And I should probably tell you right away that the disadvantage is that it might make a lot of new styles...)

  • Text and the direct Selection tool?

    When I place a space for the text or graphic, the box has an external box around it. The space between the two sets of text blocks lines. I have to use the direct Selection tool to capture the corners and close the gap.

    I have a set of adjustment that I can't find out. I would not have this second line in the boxes. Y at - it of some sort that I can disable that?

    Attached is a snapshot of the extra green line around the image... and the small red sign that the text is covered by it.

    I am very frustrated as I do several bulletins and the time is almost double.

    I'd like an answer to my e-mail address, [email protected] .

    Thank you.

    Strubbles

    This is an indication of the film text limit. You have a default text wrapping. To turn on it took off for new arrivals make sure nothing is selected and open the text layout Panel and do not select the icon of film no. Do the same thing without papers open to make sure have not set it as a global default value for the application.

  • Paste the text of the word in Apex Textarea

    Hi people,

    I have a customer who wanted to change their forms of Word (something like customer survey) screens Apex... everything went a lot, but they realized that when they try to copy text in the forms of the word in Apex textareas some characters will appear as a up-side-down question mark. Some characters are apostrophe, consecutive points (...) and so on. I don't know what is the best way to handle this, I think to write a function that escapes the characters of a text passed and match the decoding itself each time users encounter a character of bad news... but maybe someone has a better idea...


    Thank you
    Sam

    Execute the statement select in the APEX or Developer SQL in BOTH environments and see if they match, otherwise you will need to discuss with your DBA...

    select * from v$nls_parameters where parameter='NLS_NCHAR_CHARACTERSET';
    

    Thank you

    Tony Miller
    Webster, TX

  • SeaMonkey E-mail seems to leave out the spaces between the words from time to time. How can I fix? I use version 2.14.1.

    SeaMonkey Mail: When I type a paragraph of text in an e-mail message, send it to myself.
    and read it, I find that SeaMonkey merges occasionally words together leaving aside the space.
    The original text has spaces, but the received text is not. I am using 2.14.1 and were
    only for the last month or so to have this problem. At around the same time, I noticed
    only SeaMonkey started underlying parts of the words in red. This happens when I go back
    to correct a misspelled word. If these problems are linked and how to fix? I must
    reloading SeaMonkey? The same thing happens when I run it in safe mode without addons.

    This is the Firefox support forum. Help with SeaMonkey, try asking in the forum MozillaZine SeaMonkey support, here:

  • How can I transfer text of the word in the page web firefox supported?

    When I try and copy and paste text from a word in a web page document supported by firefox, it is said that it is impossible, but there must be a way to do it without having to retype everything

    You are welcome.

    Could you please click the button "solved it" to take your post out of the loop?

    Thank you.

  • Table filters break when using of text with the words "AND" or "OR".

    With the help of JDev 11.1.1.3.0

    Hello-

    The filters in the table seem to treat the words 'and' and 'or' differently when they are used in the filters in the table. Is it possible to change this behavior? I have a few sets of data where these words appear in the data. When the user performs a search on the data and uses the words 'and' or 'or' the filter no longer works. (He returned lines nil or returns all the rows.)

    Test case:

    1 create a filterable unalterable for the resources table. DEPARTMENTS table.
    2 set the Department name column to be case insensitive in its filtering:
                  <af:column sortProperty="DepartmentName" filterable="true"
                             sortable="true"
                             headerText="#{bindings.DepartmentsView1.hints.DepartmentName.label}"
                             id="c2" filterFeatures="caseInsensitive">
                    <af:outputText value="#{row.DepartmentName}" id="ot4"/>
                  </af:column>
    3. run the page.
    4. in my HR. Data REPRESENTATION, there is a service with the name "control and credit." In the service name filter, type
    a. 'control' and press ENTER - service of "control and credit" only comes
    (b) "control and" and press ENTER - only 'control and credit' Department appears
    c. 'control and credit' and press ENTER - ZERO departments appear.

    5. the Test cases for "GOLD". In the service name filter, type
    a. 'or' and press ENTER - displays all departments.


    I tried a few other words SQL in the filters but only 'AND' and 'GOLD' seems to break things.
    Is this a known bug?
    Is there a solution?

    Thank you for reading my question

    The list of documents http://docs.oracle.com/cd/E21764_01/web.1111/b31974/web_search_bc.htm#BABCCBCF 'AND' and 'GOLD' as 'Operators of Query-by-Example search criteria' are not text but the operators.
    You can try to join the text in the filter with single or double quotes and see, is that it treads in the form of text.

    Timo

  • Color of text in the DataGrid selection

    In the style of my application, I used CSS to set the color of text for the selected lines in a datagrid control by using the following:

    DataGrid {}
    textSelectedColor: #ffffff;
    }

    When I compile and run the application, clicking on a data line sets the color of the text to white, but if I click on another line, the previously selected line remains white, and lines newly selected remains black. Is this a bug in the system, or have I missed something?

    Found the bug and workaround full info here:

    http://www.Adobe.com/cfusion/knowledgebase/index.cfm?id=7e26ee37

  • change the text between the loops

    I have to update an ad that has been previously created. The original pub consists of a picture and a text and logos which loop two times then stops. Publication constraints require the announcement that two loops and a certain amount of time and stop at the end of the second loop - this was done in the original pub. The customer asked where a banner appears in the ad with specific information ('apply now for the half of January... (''), changes to information in the second rotation (loop) of the ad ("at an open house date") I'm trying to find a way to do it given the limit to two loops and a time constraint. I had to condense and edit the first draft to address the constraints, so I'm not sure that I can do almost anything with the timeline? Is this a problem of action script?

    I work in CS4 and YOU 2.0

    Any help is appreciated

    Thank you

    While Actionscript could be used to solve the problem, it is not necessarily the only solution.  You could spend with two loops and extend the timeline for the equivalent length of two loops, and change the text in the second half, repeat all that happens twice during this extended period of time.

    To take an Actionscript approach to solve, you can do a simple logic check to change the text.  There are several approaches, you could take, being...  Start with the (dynamic) textfield is empty.  First check if the textfield object contains the first loop of the text and if it then assigns the second loop, but if not, assign the first text.

    If (tfield.text == "Apply now for the half of January...") {}

    TField.Text = "to a date of open doors";

    } else {}

    TField.Text = 'apply now for the half of January... '. » ;

    }

Maybe you are looking for

  • Multifunction HP B110a stops working after update from Hp

    I have the all-in-one HP Photosmart B110a, who stops working after applying "HP updates notification". Impossible to print or access HP Solution Center (nothing works). Only solution is to use the installation CD to completely uninstall the HP softwa

  • Windows xp... 978542 KB

    Windows xp... updated security KB978542 guard download again and again and stop OE from loading. I am unable to get my email address unless I have cancel the update.

  • Send an email

    I create a group in my list of reciprients, but they always come to the top. How can I reduce this list

  • Http request message with BB10 Simulator test

    Hi all I implement request to send http request and receive the response from the server. Earlier for testing with simulators, we used MDS for the connection to the server. How to test this application using Simulator BB10 Alpha? Kindly let me know.

  • Press and hold functionality in the mobile oracle apex

    Hi allI've created a list of report of jquery page in apex 4.2I want the user to click on an entry in the list, then I want to show 4 buttons (or a new list containing four entrances instead of buttons).When the user clicks on a specific button, they