Seeking help with GREP expression

I am working with InDesign's GREP feature for the first time. I'm learning the codes but I'm still pretty lost. I'd appreciate some assistance creating an expression.
The document is a test. I'd like to reflow each question onto it's own page.
The individual questions look more or less like this:
LM_CC1234
■13»Solorrovit ipietum voluptium fugit, am, si ame.¶
Olenisquia dis etur rem quia dollenis maximus est?¶
A»plicius perovit¶
B»alit ducit fugia¶
C»vel invel ius¶
D»offic tem aboriae¶
I'm open to different possibilities, but right now I'm trying to search for the spot that's either 11 or 12 characters (including line breaks) before the square dingbat (hexadecimal x25A0). The LM_CC1234 identifier sometimes uses a format with one more letter (like SLM_CC1224) hence the 11 or 12 character count.
Once InDesign has found the spot, I want to insert a carriage return (hexadecimal xD) in that spot throughout the document.
Thank you for your time!

Hi,
Did you consider startParagraph property to use?
If      LM_CC1234
or     LM_CC1234
        ■13»Solorrovit ipietum voluptium fugit, am, si ame.¶
are separate paragraphs -- this option could be set to StartParagraph.NEXT_PAGE,
so no GREP needed here.
hope...

Similar Messages

  • Need some help with GREP expressions

    I know--KNOW--there's a way to do this, but my GREP expressions keep failing.
    I want to add an em dash before any phrase that's in a paragraph style. So I obviously want the em dash to be in the location "beginning of paragraph." All my GREP searches keep failing. Can someone help?

    Adobe's implementation of "beginning of paragraph" is a tiny bit off from standard GREP (which, in itself, is less a set of hard & fast rules, but more like "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 InDesign something to look for. Search for
    ^.
    (that's right -- one wildcard right after the start of a paragraph). You don't want to loose the character it finds, so replace with
    ~_$0
    where the first 2 codes is your em dash and the last 2 are "the entire found text". That's your original wildcard-found character!
    Don't forget to put your paragraph style in the Find Formatting box.
    This workaround works around the implementation failure, because you indeed want to add something to existing text. Unfortunately, another fairly standard GREP to look for empty paragraphs -- ^$ -- doesn't work, because then you have no place for a wildcard character ... (and yes, you can use a hard return \r instead of either first or last code, but then it won't work at beginning or end of story). It's one of those things I hope to see corrected with CS5.
    [Edit] Ha! Peter beat me to it but he made a typo. Besides, my story is longer.

  • Need help with Airport Express and so on.

    Ok so my main problem before getting into what I need help with here is that our MacBooks and now my iPhone 6 plus isn't staying online. Keep getting booted off and then I either have to select the network again or it will eventually go back on. If anyone has a solution or so please feel free to answer that as well. I'm running on Roadrunner with a Netgear 600 wireless router and a motorola modem. Both of which I'll leave the link to below for a better look.
    My Main Question: So I'm looking at a new wireless router mainly and possibly a new modem. I know Apple products are trustworthy but how good is the Airport Express and other Airport products. Also what is the Maximum speed and Maximum data speed for the cheapest express station and if anyone knows the speeds of the other devices it would be greatly appreciated.

    DSL Router to Netgear 5-port Switch and I used the switch to connect to Airport Extreme, TV, Blue-Ray DVD player and DirecTV Receiver.
    The AirPort Extreme base station (AEBS) is a router so it will do what you need.
    You need to reconfigure your setup. Connect the WAN port of the AEBS to the DSL router. Then connect the Netgear switch to one of the LAN ports on the AEBS. The AEBS will properly share the connection.

  • Help with time expression!

    Hi everyone, I need some help with the time expression.
    Im working with video copilot´s plugin element 3d and i've made a spere shaped thing with particles which im going to sync to music. The problem is that when i make the simple expression "time*321" on the noise evolution value to make the sphere move organicly throughout the whole video it only does so for about two minutes then it just stops changing even though the value changes. The pictures might help you understand.
    Pictures: http://puu.sh/adNNB/e8de72a1e8.jpg, http://puu.sh/adNQJ/4fe8d4fe94.jpg, http://puu.sh/adNRx/8ecff2b2ca.jpg
    Then there is another problem which is that the sphere evolves alot faster with the time set to 321 compared to when i have it on 30.
    I hope you can help me and im sorry for my bad english just tell me if there is something you dont understand.

    I think you are giving the rotation value more than it can handle. After a while, many of the values in AE will stop increasing because the math can't go any further. Here are two things for you to try.
    1) Use this simple expression for increasing the value of something.
    THE BIG PICTURE:  ([Amount of Change] / [Number of Seconds]) * time
    ROTATION EXAMPLE: (360 / 5) * time;   <----- This will rotate a layer 360º over 5 seconds. It will also continue to rotate until the end of the comp or you run out of math.
    POSITION EXAMPLE:  delta = (500 / 2) * time; // This changes the value of "delta" 500 units over 2 seconds and continues.
                                       x = value[0] + delta; // Uses the x value from frame 0 and adds the delta to provide movement
                                       y = value[1]; // Uses the y value
                                       [x, y] // sends the values back to the layer
    2) Modulus will recycle the numbers. Using your current expression, you can add modulus, and use it to recycle your math.
    EXPRESSION:  (time * 321) % 360
    The % is the modulus, and it resets the count every 360º.
    Good luck!
    Trent

  • Seeking help with software upgrade questions for my PowerBook G4

    I am seeking help/advice for a very low tech guy. I upgraded my PowerBook G4 (ancient I know but I have trouble with our thow away society), to Leopard 10.5.2. However, my iDVD no longer works. I plan on upgrading to iLife'08, but based on the system requirements, I am not certain all of the features (i.e. iMovie'08) will work on my older processor. Before I upgrade to iLife, can anyone tell me if I should do it and if they will work on my all the features will work on my PowerBook G4?

    Many prefer iLife'06 to '08, but we went from '05 to '08.
    You are correct in that iMovie'08 will not run on your Book, but when you install iLife'08 you are given the opportunity to download iMovie'06 for free.
    I can't vouch for it fixing your iDVD however.
    Joe

  • Seeking Help with Album Image Issues in iPod Classic

    Hi folks -
    I have a new 160 iPod Classic and have two album image-related issues I'd appreciate some help with.
    In the case of several albums where I'd associated my own art with them in iTunes, the formatting appeared off in my iPod due to the vertical/horizontal proportions. So I corrected the images, replaced the images via iTunes, and re-synced. All of the old images were replaced - except for two. Is there any way to get my iPod to recognize the change to these two images, as it did for all the others?
    Secondly, my "The Allman Brothers Band Live at Fillmore East" album was appearing twice in both the Cover Flow and Album list. That was strange, except that after the latest sync it now appears six times! It's only in one place in iTunes, and not erroneously set as a compilation or anything. This is the only album displaying this behavior...
    Thanks for any suggestions or advice!
    Frank
    Message was edited by: frank3si

    Yes my e-mail address is [email protected] 
    Thank you for your kind attention to my problem. I am looking for one on one brief consultation with my laptop in Cincinnati. If not then I will compose a clear question with VI.
    These manuals are well known to me NI Visions Concepts ManualIMAQ Vision for LaVIEW User ManuelNI-IMAQ for USB Cameras My problem is moving to the next step of Create an array of USB imagePerform math on array Display results Sincerely,Tom Lohre cell 513-236-1704, [email protected] http://tomlohre.com/images/lafley.jpgAG Lafley, Chairman & CEO of Proctor & Gamble http://tomlohre.com/lafley.htm A.G. Lafley enjoyed hearing of Tom's painting robot and thought it played well to his new book: "The Game-Changer: How You Can Drive Revenue and Profit Growth With Innovation." http://tomlohre.com/newart.htm
    Tom Lohre artist/scientist
    Has a operating painting robot using RoboLab/RCX
    Developing a LabView/ NXT robot that analyzes an image for aesthetic quality.

  • Help with this expression.

    Hey everyone,
    I'm not the best at expressions, but i'm trying to learn and was wondering if someone could tell me what is wrong with the expression I have. It is from a tutorial found in video copilots pro scores, and its purpose is to be able to randomly distribute many layers over x, y, and z space.. without having to manually place them.
    I tried this expression last night, and it gave me a similar error. Tried it again today and it seemed to work, but then I decided to precomp my layer and it broke the expression, so I went to type it again.
    Below is what I typed, and the subsequent error message. It tells me the error is on line 3, and the rest you can see.
    If someone could point out where I went wrong here I would greatly appreciate it.
    Thanks,
    Dan

    I actually undo'd until the original expression that "worked" came back, copied it, and pasted in the position field of the precomp, and I get the same error.
    Kinda confused, especially since the expression was exactly the same.

  • I need help with GREP

    Dear Forum,
    I can't seem to figure out how the GREP-Search in InDesign is working.
    I have a document with 60 pages with a large number of incorrectly formatted prices. The false expressions are for example:
    EUR 250.000,00
    EUR 2.000,00
    EUR 15,00
    and so on with every possible value
    But they should be formatted as:
    250.000 Euro
    2.000 Euro
    15 Euro
    What do I have to tell GREP-Search in oder to format them correctly?
    Thanks a lot for your help,
    Ralf

    Vamitul, it's not unusual that there are things that can go wrong. But both our suggstions work correctly on the specified list -- and Ralf did not say what should happen when there is a number in cents, so it seems he wants to throw them away.
    If not: here is a single GREP that will move the EUR to the back and discard only ",00" cent values; other cents are preserved.
    \bEUR *([\d.]+(,\d\d\b(?<!,00))?)(,00\b)?
    replacing again with
    $1 Eur
    The result:
    EUR 250.000 -> 250.000 Eur
    EUR 250.000,00 -> 250.000 Eur
    EUR 2.000,01 -> 2.000,01 Eur
    EUR 15,05 -> 15,05 Eur

  • Need help with regular expression

    I'm trying to use the java.util.regex package to extract URLs from html files.
    The URLs that I am interested in extracting from the HTML look like the following:
    <font color="#008000">http://forum.java.sun.com -
    So, the URL is always preceeded by:
    <font color="#008000">
    and then followed by a space character and then a hyphen character. I want to be able to put all these URLs in a Vector object. This doesn't seem like it should be too difficult but for some reason I can't get anywhere with it. Any help would be greatly appreciated. Thanks!

    hi gupta am not sure of the java syntax but i can tell u about the regular expression...try this....
    <font color="#008000">(http:\/\/[a-zA-Z0-9.]+) [-]
    i dont know the java methods to call...just the reg exp...
    Sanjay Acharya

  • Help with Regular Expression for field validation

    I'm fairly new to using regular expressions and using Acrobat. This is probably a simple question, but I've been unable to figure it out.
    I have a text field on a PDF that I would like to be 9 characters in length. The first 2 characters can only be alphanumeric, the last 7 characters can only be numeric.
    At first I was using the following, which allows all the characters to be alphanumeric:
    var re = /^[A-Za-z0-9 :\\_]$/;
    if (event.change.length >0) {
    if (event.willCommit == false) {
        if (!re.test(event.change)) {
            event.rc = false
    That works fine, but it's not quite what I needed. With some assistance I changed it (see below) to fit what I was looking for. However, this didn't work; it prevents anything from being entered in the field:
    var re = /^[A-Za-z0-9]{2}\d{7}$/;
    if (event.change.length >0) {
    if (event.willCommit == false) {
        if (!re.test(event.change)) {
            event.rc = false
    Any help would be greatly appreciated.
    Thanks...

    Here's a function you can call form the field's custom Format script. It should be placed in a document-level JavaScript:
    function custom_ks1() {
        // Define non-commited regular expression
        var re = /^[A-Za-z0-9]{0,2}([0-9]{0,7})?$/;
        // Get all of the characters the user has entered
        var value = AFMergeChange(event);
        // Allow field to be cleared
        if(!value) return;
        if (event.willCommit) {
            // Define commited regular expression
            var re = /^[A-Za-z0-9]{2}[0-9]{7}$/;
            if (!re.test(value)) {  // If final value doesn't match, alert user
                app.alert("Your error message goes here.");
                // event.rc = false
        } else {  // not commited
            // Only allow characters that match the regular expression
            event.rc = re.test(value);
    Call it like this:
    // Custom Keystroke script
    custom1_ks();

  • Help with regular expression needed

    Hi,
    Perhaps someone here can help me with my regular expression I'm trying to build in my Java code.
    The regular expression that I'm looking to build consists of any non-whitespace character up until it finds one or two <>= symbols and then any character thereafter. So both these Strings would match the expression:
    City 1==London
    Age>=18
    The regular expression that I'm using is as follows:
    (\\S+)([><=]){1,2}(.+)However, group 1 always retrieves the first <>= symbol as in "City 1=". How can I make the <>= part greedy so that it retrieves both operator symbols?
    Thanks.

    Make the first group, the non-spaces, reluctant:
    "(\\S+?)([<>=]{1,2})(.+)"

  • Help with regular expression to find a pattern in clob

    can someone help me writing a regular expression to query a clob that containts xml type data?
    query to find multiple occurrences of a variable string (i.e <EMPID-XX> - XX can be any number). If <EMPID-01> appears twice in the clob i want the result as EMPID-01,2 and if EMPID-02 appears 4 times i want the result as EMPID-02,4.

    with
    ofx_clob as
    (select q'~
    <EMPID>1
    < UNQID>123456
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    <EMPID>2
    < UNQID>123457
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    <EMPID>1
    < UNQID>123458
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    ~' ofx from dual
    select '<EMPID>' || to_char(ids) || '(' || to_char(count(*)) || ')' multi_empid
      from (select replace(regexp_substr(ofx,'<EMPID>\d*',1,level),'<EMPID>') ids
              from ofx_clob
            connect by level <= regexp_count(ofx,'<EMPID>')
    group by ids having count(*) > 1
    MULTI_EMPID
    <EMPID>1(2)
    with
    ofx_clob as
    (select q'~
    <EMPID>1
    < UNQID>123456
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    <EMPID>2
    < UNQID>123457
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    <EMPID>1
    < UNQID>123456
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    <EMPID>2
    < UNQID>123456
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    <EMPID>1
    < UNQID>123458
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    ~' ofx from dual
    select '<EMPID>' || listagg(to_char(ids) || '(' || to_char(count(*)) || ')',',') within group (order by ids) multi_empid
      from (select replace(regexp_substr(ofx,'<EMPID>\d*',1,level),'<EMPID>') ids
              from ofx_clob
            connect by level <= regexp_count(ofx,'<EMPID>')
    group by ids having count(*) > 1
    MULTI_EMPID
    <EMPID>1(3),2(2)
    Regards
    Etbin
    Message was edited by: Etbin
    used listagg to report more than one multiple <EMPID>

  • Help With Regular Expression In Apex Validation

    Apex 3.2
    There is a validation type of regular expression in apex, but I have never used regular expression before,
    so a little help is appreciated.
    I need to validate a field. It is only allowed to contain alpha characers, numbers, spaces and the - (dash) character.
    I have tried several times to get this working
    eg
    [[:alpha:]]*[[:digit:]]*[[:space:]]*[-]*
    ^[[:alpha:][:digit:][:space:]-]+?
    and others, but just can't to get the syntax correct.
    Can someone help me with this please
    Gus

    Example:
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'This is some example text' as txt from dual union all
      2             select 'And this is the 2nd one with numbers' from dual union all
      3             select 'And this allows double-barrelled words with hyphens' from dual union all
      4             select 'But this one shouldn''t be allowed!' from dual
      5            )
      6  --
      7  select *
      8  from t
      9* where regexp_like(txt, '^[[:alnum:] -]*$')
    SQL> /
    TXT
    This is some example text
    And this is the 2nd one with numbers
    And this allows double-barrelled words with hyphens

  • More help with GREP needed

    I have been attempting to create some nested styles.
    So far, I am getting the hang of it.
    I have created a grep style that will make all text after the word "NOTE: " into italic. Also, I have grep style that makes all text that is "FIGURE +\d+\d" into bold text.
    The problem I have is that if the word "FIGURE " etc. is in the italicized note text, then it will not become bold.
    For example: "Operate the switch to begin the process (FIGURE 3-3). Make sure guards are closed (refer to FIGURE 3-1)."
    That works fine, and "FIGURE " is bold. However, when I change the sentence by adding "NOTE: Make sure guards... " it all becomes italic, and I loose the bold on "FIGURE 3-1"
    So, is there a way to augment my italic grep with some kind of inclusion... as if I were saying "if "FIGURE +\d+\d" make that is bold italic"
    sorry for the long-winded attempt to describe what I want to do.
    Thanks in advance for help.
    RPP

    RPP,
    The trouble is that in GREP style you can find text but not formatting, so you can't say something like "find FIGURE only when it's italic". In the Find/Change dialog you can, but in GREP styles you can't.
    You also can't say "look for FIGURE if it's preceded by NOTE: and any characters in between". Unfortunately, lookbehind can't cope with variable-length text. So if you always have "NOTE: Refer to FIGURE ...", then you can use lookbehind and you set-up would be this:
    apply italic to FIGURE [-\d]+
    apply bold to NOTE:.+
    apply bold-italic to (?<=NOTE: Refer to )FIGURE [-\d]+
    The first parenthetical is a lookbehind: in this case, FIGURE looks behind, meaning you find FIGURE only when it's preceded by "Note: Refer to", which is not matched itself. So bold italics would be applied only to FIGURE [-\d]+, and only when preceded by ...
    But you're not likely to have such fixed text. When you have just a few alternatives, you can list them as alternatives, so if you always have "Note: Refer to " or "NOTE: See " you could salvage your set-up, but with more than let's say three alternatives it gets messy.
    (?<=NOTE:.+? )FIGURE [-\d]+ , which you would hope would match any text from NOTE: to FIGURE, doesn't work as a lookbehind.
    Peter

  • Help with Regular Expressions and regexp_replace

    Oh great Oracle Guru can I can gets some help
    I need to clean up the phone numbers that have been entered in Oracle eBusiness per_phones table. Some of the phone numbers have dashes, some have spaces and some have char. I would just like to take all the digits out and then re-format the number.
    Ex.
    914-123-1234 .. output (914) 123-1234
    9141231234 ..again (914) 123-1234
    914 123 1234 .. (914) 123-1234
    myphone ... just null
    (914)-123-1234.. (914) 123-1234
    I really tried to understand the regular expressions statments, but for some reason I just can't understand it.

    Hi,
    Welcome to the forum!
    I would create a user-defined function for this. I expect there will be a lot of exceptions to the regular rules (for example, strings that do not contain exactly 10 digits, such as '1-800-987-6543') that can be handled, but would require lots of nested fucntions and othwer complicted code if you had to do it in a single statement.
    If you really want to do it with a regular expression:
    SELECT     phone_txt
    ,     REGEXP_REPLACE ( phone_txt
                     , '^\D*'          || -- 0 or more non-digits at the beginning of the string
                           '(\d\d\d)'     || -- \1 = 3 consecutive digits
                    '\D*'          || -- 0 or more non-digits
                           '(\d\d\d)'     || -- \2 = 3 consecutive digits
                    '\D*'          || -- 0 or more non-digits
                           '(\d\d\d)'     || -- \3 = 4 consecutive digits
                    '\D*$'             -- 0 or more non-digits at the end of the string
                     , '(\1) \2-\3'
                     )          AS new_phone_txt
    FROM    table_x
    ;

Maybe you are looking for

  • How to view PDF files like a flipping magazine?

    Hi, I am new here. I didn't know if it is the optimum catagory for my question, I hope you guys will help me. In brief, I want to view PDF files like a flipping magazine. You know, just the same flipping effect that ibook did on ios. Adobe reader is

  • Keynote and pages are now free, but why do i need to pay for them still when there now free?!?

    keynote and pages are now free, but why do i need to pay for them still when there now free?!?

  • Tab Control/Display Data

    Hello All, I have an issue with displaying large amounts of data. What my program does is calculate INL/DNL errors on analog to digital converters, when the program runs it generates 3 graphs and a couple of numbers. The idea is to be able to run the

  • Email suggestion from iTunes store fail (also other emails)

    Hello, due to prevention of Spam (seems to) sending suggestion from iTunes Store fails (but I got an email, that it fails From this a short excerpt on the failure (the * are from me :-): The original message was received at Wed, 25 Oct 2006 23:16:02

  • Regular expressions its URGENT !!!

    i have a long string of regular expressions seperated by "|" and i need to know which regular expression the particular string matched how can i find that and can i do it using java .util.regex thanks in advance