Using Grep on multiline textframe

Hello
I am using GREP to find text and replace in scripting it but It seems to not work on multiline text. Ex.:
My texte
My text2
I use ^.({8})(My text2){1}) to replace the 'My text2' but it doesnt work. Is there any way to make safe text subtituions with grep?

If you have a return between the two lines, the GREP needs to take that into account... (i.e. \r)
Harbs

Similar Messages

  • Finished script: Use grep find/change to fill in a supplied table of contents

    This script is now complete, and has been the subject of most of my previous posts. Just in case anyone wanted to know what the finished script ended as, here it is.
    Thanks so much to all. A lot of really helpful folks on this board are very responsible for the success of this task. This script is to be one of hopefully many in the creation of our records. But it's a huge leap forward. Thanks again to everyone that helped.
    Cheers,
    ~Nate
    Task:
    Automatically find town names in listings, and fill in table of contents template on page 2 accordingly.
    Example of page 2 toc, initially:
    Example of a page of content. The town names are what need to be referenced on the TOC:
    Example of page 2 toc once script is finished:
    Because of the need to include the transaction dates on the TOC (comes as a provided, tagged-text file), a simple Indesign-generated TOC can't be used alone.
    This script uses an Indesign-generated TOC that's on a master page called "T-tocGen" ... It then uses grep search and replaces to grab the needed information, and insert it into the page 2 TOC.
    The script will update a generated TOC and then search for an instance of a page number, and town name. The generated toc lists all included towns in the following format:
    (line start)## tab townName(line end)
    In Grep, this would be (please note, extra \ for \d and \t ... javascript needs that for some reason):
    ^\\d+\\t(.*)$
    After the script gets the info it needs from a found instance of the above, it replaces that line with "---", to prevent that line from being picked up once again.
    The script with then place the needed page number in it's rightful place on page 2, replacing the XX.
    A while loop is used to repeat the above process until there are no longer any instances of "^\\d+\\t(.*)$" present.
    Not every town runs every issue, so once the script is done, it removes all remaining instance of "XX" on the page 2 TOC.
    FINAL CODE:
    TOC replace
    This script will use grep find/change methods to apply page numbers in
    tocGen to the XX's on page2TOC.
    // define the text frame of generated TOC
        var tocGenFrame  = document.masterSpreads.item("T-tocGen").pages.item(0).textFrames.item(0);
    // udpate generated TOC ... store contents in tocGenStuff
        var tocGenStuff = updateTOCGen();
    // set variable for while loop
    var okGo = "1";
    // while okGo isn't 0
    while(okGo.length!=0)
    // get town info from tocGen
    getCurrentTown();
    // replace XX's with tocGen info
    replaceTown();
    // grep find ... any remaining towns with page numbers in tocGen?
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "^\\d+\\t(.*)$";
    // set current value of okGo ... with any instances of above grep find in tocGen
    okGo = tocGenFrame.findGrep();   
    // grep find/change all leftover XXs in page2TOC
    app.findGrepPreferences = app.changeGrepPreferences = null;       
    app.findGrepPreferences.findWhat = "^XX\\t";
    app.changeGrepPreferences.changeTo = "\\t";
    app.activeDocument.changeGrep();  
    // clear grep prefs
    app.findGrepPreferences = app.changeGrepPreferences = null;
    //  functions                  //
    function getCurrentTown()
    // grep options   
    app.findChangeGrepOptions.includeLockedLayersForFind = true;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeHiddenLayers = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findChangeGrepOptions.includeFootnotes = true;
    // grep find:  startLine anyDigits tab anyCharacters endLine
          app.findGrepPreferences = app.changeGrepPreferences = null;
          app.findGrepPreferences.findWhat = "^\\d+\\t(.*)$";
    // get grep find results      
    currentGen = tocGenFrame.findGrep();  
    // store grep results content into currentLine
    currentLine = currentGen[0].contents;
    // match to get array of grep found items
    currentMatch = currentGen[0].contents.match("^\\d+\\t(.*)$");
    // second found item is town name, store as currentTown
    currentTown = currentMatch[1];
    // change current line to --- now that data has been grabbed
    // this is because loop will continue as long as the above grep find yields a result
           app.findGrepPreferences.findWhat = "^\\d+\\t"+currentTown+"$";
                  app.changeGrepPreferences.changeTo = "---";
                tocGenFrame.changeGrep(); 
    function replaceTown()
    app.findChangeGrepOptions.includeLockedLayersForFind = true;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeHiddenLayers = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findChangeGrepOptions.includeFootnotes = true;
    // find: XX currentTown .... replace with: currentLine
        app.findGrepPreferences = app.changeGrepPreferences = null;
        app.findGrepPreferences.findWhat = "^XX\\t"+currentTown+" \\(";
        app.changeGrepPreferences.changeTo = currentLine+" \(";
    app.activeDocument.changeGrep();   
    function updateTOCGen()
    //set vars ... toc text frame, toc master pag
        var tocGen  = document.masterSpreads.item("T-tocGen").pages.item(0).textFrames.item(0);
        var tocGenPage  = document.masterSpreads.item("T-tocGen").pages.item(0);
    //SELECT the text frame generatedTOC on the master TOC
        tocGen.select();
    //Update Table of Contents by script menu action:
        app.scriptMenuActions.itemByID(71442).invoke();
    //Deselect selection of text frame holding your TOC:
        app.select(null);
    //store contents of toc text frame in variable
        var tocGenText = tocGen.contents;
    //return contents of tocGen
        return tocGenText;

    Thanks for the reply.
    You are correct but the problem is there are three rows, One row is 100% black, the second is 60% black and the third is 40% black. I want to change the black to blue, the 60% black to an orange and the 40% black to a light shaded blue. In the find/change option you can select the tint you want to find and replace but yea.. does work on table cells.. oddly enough.

  • 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

  • Using GREP to bold Date and Event Name

    Hi
    I am stumped at how to properly apply a bold style to a combination of dates and event names using GREP. I am including three examples below. I do have Paragraph and Characters styles set up. The area I would like to effect the change is in all caps. I am trying to add a bold style only to the dates and the title of the event with out changing the rest of the information.
    I started of with this GREP Style:
    \d{1,2}\/\d{1,2}|\d\-?\s|\u
    It is bolding the dates and the name of the event. But it's not bolding the small dash between events that have a beginning and end dates or the en dash. It is randomly bolding other numbers and capital letters that it should not. Very frustrating. Each time I alter the GREP Style above, it makes it worse. This is as close as I got to the desired effect. Any ideas how to fix this?
    12/6-8 — HEALING WEEKEND AT TRUE NORTH HOLISTIC CENTER.  Friday  11am-5pm. Private Integrated Healing sessions, Friday 6:30pm-Sunday noon. “Blue Christmas” Retreat: Coping with Sadness at the Holidays; Sunday 3-7pm. Public Integrated Reiki™ clinic. Hubbardston, MA  www.truenorthholisticcenter.org. (978) 820-1139.
    12/6-12/8 — READ AND PLAY MUSIC IN A WEEKEND! World famous seminars turns beginners into musicians, revitalizes and inspires even pro musicians. 169 Mass Ave, Boston. (781) 599-1476 or http://signup.understandingofmusic.com or [email protected]
    12/7 — REIKI CERTIFICATION. Wilton, NH. Libby Barnett, MSW. 32 years experience. Reiki Energy Medicine author. Notebook, pin, certificate awarded. Credit cards accepted. CEU’s/contact hours. Call (603) 654-2787 or www.reikienergy.com. Reiki II: 12/8

    Thanks! That works. I am using a paragraph style for the body and have a bold character style for the information that needs to be bolded. I notice there are some listings that uses a colon and the bolding continued into the description where the first period appears (see samples below). I added a colon (to the shorter GREP style you suggested) in addition to the perod and excalamation point to search for.. Now the bolding stops at the colon but does not include up to the word "CARRY" (see first example). The second example, the bolding should stop after "FAIRE" but cotinues to the word Wisdom because of the period.
    I wish there was a option in the GREP drop menu to search for All Caps only and not Any Uppercase Letter. Is it a case were I need to manually edit those instances so it conforms to the norm? Or is there away to modify the GREP expression ^.+?[.!] to also include other instance like the example below?
    I alread try to add an additional rule using the Postive Look Ahead and nothing. And using the Any Uppercase Letter option, either forces the text back to the begining looking unstylized or it forces any capital letters to be bolded.
    12/8-12/13 — WESTERN REIKI MASTERS: BE ATTUNED TO CARRY Japan’s Gendai Reiki lineage: Usui Mikao-Kan’Ichi Taketomi-Kimiko Koyama-Hiroshi Doi-Audrey Pearson. Learn to teach all 4 levels of Japan’s Gendai Reiki Ho. www.yogapathways.com. (508) 740-9870 or Facebook: ‘Gendai Reiki America’
    11/23 — PSYCHIC AND HOLISTIC FAIRE at Women of Wisdom. North Easton, MA. Psychics, angel readings, mediums, crystal healings, Gaiadon Heart, chair massage, Reiki and more! Sign yourself up for a few appointments and bring your friends! www.womenofwisdominc.com (508) 230-3680.

  • Change paragraph style of empty row using GREP

    Hello again ... another GREP query if anyone can assist!
    How can I change a completely empty paragraph line (like those found between verses in a poem, for example) to a different paragraph style so I can control the space better using GREP?

    Fair point ... but if I demonstrate:
    Text line here
    Text line here
    Text line here
    Text line here
    Text line here
    Text line here
    The empty row (4) between the two blocks is in the same paragraph style as the rest of the text. Indeed if lines 3 or 5 were in different styles I could remove the empty row and create a space using before/after spacing. But it is all in the same style. I was wondering if there was a way using GREP to change the para style of an empty row ie 4.

  • Add style to next paragraph (by using GREP?)

    Can someone help? I have a problem - long (300+ pages) text with questions and answers. Questions are using paragraph style "x" and answers are using paragraph style "y". There are usually 3-6 paragraphs of text in every answer. I need to change only the first paragraph's style after the question paragraph to style "z", so that the structure of styles would look like  x-z-y-y-y-y-x-z-y-y... (now it looks x-y-y-y-y-y-x-y-y-y...). Can it be done using GREP somehow?
    Claudius

    I sell a script on my website for this sort of thing:
    www.freelancebookdesign.com
    Under the "Scripting" tab, check out a script called "Change Consecutive
    Paragraphs".
    Ariel

  • Ignore Line break in find text using grep

    Hi everyone!
    I need to find the text in document using grep.
    find text for :
    Xereptatiuria que alique volo eium qui dolupid ut
    voluptatiam earum saestorepel iuscit im quas et modisimodit.
    The above sentence cannot having line breaks. But document having multiple line breaks.
    so, please to give a tip to find the text using grep.
    I am not excepting this type of result by following.
    Xereptatiuriaque\n alique volo\neium qui dolupid ut\r voluptatiam earum\n saestorepel iuscit im quas et\n modisimodit.  ------------this is not.
    Any another way to find (i.e)., ignore the line break
    simply like this, 
    (?s:Xereptatiuria que alique volo eium qui dolupid ut
    voluptatiam earum saestorepel iuscit im quas et modisimodit.)      --------- the line break wherever it is found,ignore line break in single command.
    Thanks by,
    John Peter.

    johnp45247251,
    what do you really want to do?
    Like pkahrel in your other thread Find Grep And Ignore the line break said:
    pkahrel schrieb:
    You're a moving target: you change your question in each post. Do yourself a favour and go and read up on GREP.
    johnp45247251, one question:
    Could it be possible, that you doesn't understand correctly, how Grep really works?
    <edit by pixxxel schubser>
    Furthermore your example text is different to your screenshot. Your text is:
    »Xereptatiuriaque\n alique volo\neium qui dolupid ut\r voluptatiam earum\n saestorepel iuscit im quas et\n modisimodit.«
    And your screenshot shows:
    »Xereptatiuriaque\n alique volo\n eium qui dolupid ut \rvoluptatiam earum\n saestorepel iuscit im quas et\n modisimodit.«
    Normally the text should look like this:
    »Xereptatiuriaque\nalique volo\neium qui dolupid ut\rvoluptatiam earum\nsaestorepel iuscit im quas et\nmodisimodit.«
    Please explain what do you really want to do and exactly if additional spaces are exists or not!
    Could it be:
    you have a text with paragraphs and with many line breaks in that paragraph and there are no spaces exists before or after your line breaks. And is your destination to remove all the line breaks from your text?
    </edit by pixxxel schubser>
    Then the way is not to find the text completly and to ignore the line breaks – the way is to find the line breaks and replace with a space, e.g. like that:
    find:
    \n
    replace with:
    \s
    (change all)
    Regards
    pixxxel schubser

  • Do I need to use GREP for this?

    I have set up my TOC for my book just fine. In my Contents, the headings from each chapter are pulled in and used as the entries for the TOC, then followed by its page number.
    I would like to add a word (the word "Chapter") before each numbered contents entry. Would I use GREP styles for this?
    I'm using CS5.
    Thank you!

    You can create an autonumbered list format that includes text like "Chapter " along with numbers, for the TOC paragraph style, so no scripting needed. Search Google for terms like "InDesign numbered list format text," without quotes for details.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices
    cc2545 wrote:
    I have set up my TOC for my book just fine. In my Contents, the headings from each chapter are pulled in and used as the entries for the TOC, then followed by its page number.
    I would like to add a word (the word "Chapter") before each numbered contents entry. Would I use GREP styles for this?
    I'm using CS5.
    Thank you!

  • Using GREP for Address Formatting Varying Addresses

    I create pre-addressed wedding envelopes for my clients. They provide me with a list of their addresses in a word document, and I lay them out in InDesign with each page being one envelope. (So I can export as a pdf and print all 100 or so envelopes in one swipe.)
    The problem is, I'm getting more and more requests for more dynamic addresses. For example, lets say they want something like this:
    Mr. & Mrs. Smith
    1 3 4 5   M A I N   S T R E E T
    NEW YORK, NEW YORK
    87996
    Solution 1: Use Line Styles
    For example:
    Line 1: Style A
    Line 2: S T Y L E  B
    Line 3: STYLE C
    Line 4: Style D
    This would typically work, except sometimes the addresses have 4 lines instead of 3, making some addresses look like this:
    Mr. & Mrs. Smith
    1 3 4 5   M A I N   S T R E E T
    APARTMENT - 7B
    New York, New York
    87996*
    *hint: It thinks this is line 1 again.
    Instead of the desired result:
    Mr. & Mrs. Smith
    1 3 4 5   M A I N   S T R E E T
    A P A R T M E N T  - 7 B
    NEW YORK, NEW YORK
    87996
    Also, it would require replacing every return with a forced line break (attainable, but still.)
    Solution 2: Use Nesting Styles
    This *might* work, but I can't tell it to stop the nesting style with a line break/return, only with specific characters (which I would have to insert line by line and negate the whole point.
    Solution 3: Use GREP
    This is a foreign language from another planet and I CANNOT figure it out. I can set character styles no problem, but telling ID in GREP when to apply them is a mystery to me. HELP!
    BobLevine EugeneTyson @P_Spier << you guys are my heroes!  InDesign

    I don't think that's what he means. The Yahoo push mail uses Yahoo's IMAP which only works if you set up your account on iPhone using the preset Yahoo account setup. This setup does not allow for changing the FROM address, so the email appears to be from the underlying yahoo.com account. If you pay for Yahoo Plus you can use POP and change the FROM address, but then you don't get the benefit of the push email.
    I'd love to hear a solution, but after calling Apple and Yahoo and combing the support boards of both, I don't think its possible at this time.

  • Use Grep Styles to add multiplication symbol.

    Hey Everyone,
    Has anyone used grep styles to change 5x6 to 5×6?  I tried to do it, but the dialog box to create a grep style is the character style dialog box. But, I am unable to enter a glyph. Now, I can use the find and search for \d+x\d+, but it will find 5x6 and change it all to × instead of changing the "x" only. I would hate to have to search for "x" in a document. Just trying to find a way to change "number 'x' number" to "number '×' number."
    Thanks,

    Or you can use (?<=\d)x(?=\d)  [that's a look-behind/lookahead withthe x in the middle] and apply a character style to scale and shift the x. GREP styles cannot change the glyph used, only the formatting.

  • ID-CS4 -JS - - Can't find using Grep options - Reg.

    Dear All,
      Here I have a doubt about the "Find / Change Grep" in InDesign CS4.
    I can find the "Force Line Break" using the Grep options : ([a-zA-Z]*)-\\n([a-zA-Z]*)]
    Some time this Grep is working, some time this is not working ...
    I don't know what I made the mistakes. Please let me know any one can suggest and modify the below coding.
    I supposed to close and re-open the InDesign CS4 and ExtendScript tool, then First time this Grep is working fine...
    So I confused this. Please any one can give me a solutions.
    //================= Coding ==================//
       var myDoc=  app.activeDocument;
           app.findChangeGrepOptions.includeFootnotes = false;
           app.findChangeGrepOptions.includeHiddenLayers = false;
           app.findChangeGrepOptions.includeLockedLayersForFind = false;
           app.findChangeGrepOptions.includeLockedStoriesForFind = false;
           app.findChangeGrepOptions.includeMasterPages = false;
           app.findGrepPreferences.findWhat = "([a-zA-Z]*)-\\n([a-zA-Z]*)";
             mySearch = app.findGrep();
             for(var myForce =0; myForce<mySearch.length; myForce++)
              app.select(mySearch[myForce]);
              var mySel = app.selection[0];
               myConts = mySel.contents;
              app.select(mySearch[myForce]);
              var mySel = app.selection[0];
               myConts = mySel.contents;
              app.findGrepPreferences = NothingEnum.nothing;
               app.changeGrepPreferences = NothingEnum.nothing;
    //=============== End of the Coding ========================//
    Please any one can kindly help me....
    Thanks & Regards
    T.R.Harihara SudhaN

    Dear Vaasu Devi,
      Many thanks for your reply...
    I found, where I mistaken....
    Here My Correct Code :
    //================= Coding ==================//
       var myDoc=  app.activeDocument;
           app.findChangeGrepOptions.includeFootnotes = false;
           app.findChangeGrepOptions.includeHiddenLayers = false;
           app.findChangeGrepOptions.includeLockedLayersForFind = false;
           app.findChangeGrepOptions.includeLockedStoriesForFind = false;
           app.findChangeGrepOptions.includeMasterPages = false;
           app.findGrepPreferences.findWhat = "([a-zA-Z]*)-\\n([a-zA-Z]*)";
             mySearch = app.findGrep();
             for(var myForce =0; myForce<mySearch.length; myForce++)
                        app.select(mySearch[myForce]);
                         myConts = mySearch[myForce].contents;
                         $.writeln(myConts);
              app.findGrepPreferences = NothingEnum.nothing;
               app.changeGrepPreferences = NothingEnum.nothing;
    //=============== End of the Coding ========================//
    app.select() is working fine, meanwhile, I get the selection of the contents. That time only its throw the Error message. So I used to divert, app.select and Select Value of Contents to pass the "myConts" variable then I will do the other funtions.... Now My this time I'm not getting the Errors...
    Thanks Once again
    Regards
    T.R.Harihara SudhaN

  • Trying to use grep from within java,using exec command!

    Hi all!
    I would like to run a grep function on some status file, and get a particular line from it, and then pipe this line to another file.
    Then perfom a grep on the new file to check how many of the lines above are present in that file, and then write this value to a new file.
    The final file with a numerical value in it, i will read from within java,as one reads normal files!
    I can run simple commands using exec, but am kinda stuck with regards to the above!
    Maybe i should just do all the above from a script file and then run the script file from exec. However, i dont want to do that, because it kinda makes the system dependent,..what if i move to a new machine, and forget to install the script, then my program wont work!
    Any advise?
    Thanks
    Regards

    With a little creativity, you can actually do all that from the command line with a single command. It'll look a little crazy, but it can be done.
    Whether the script exists on the local machine or not has zero to do with platform indpendence. You assumedly have to get the application onto the local machine, so including the script is not really an issue at all. However, you're talking about system independence, yet still wishing to run command line arguments? The two are mutually exclusive.

  • Want to Insert Text at Beginning of a Paragraph Using GREP

    I'd like to find the beginning of a paragraph and insert a text (that uses a specific character style) into that paragraph. Below is how I've set up the find/change:
    It almost works. The phrase "SECOND ITEM IS FREE!" is inserted at the beginning of the paragraph, which is what I want. But the first letter of the word that was originally at the beginning of the paragraph picks up the character style used on the inserted text. How do I insert the text without changing the character style of the existing text?
    Thanks in advance for any ideas on this

    [Jongware] wrote:
    (Short) Can't be done.
    (Long) Well, it can, but not in a single replace. You'd have to first insert the text, then assign the correct character style.
    (Slightly longer) You are physically re-inserting that final character, and so it will get that character style assigned. The usual way of finding-but-not-marking is to use a positive lookahead; but that doesn't work, because you would end up with two locations (the caret and the lookahead), and InDesign's particular implementation of GREP does not allow that. (Or rather -- irritatingly -- sometimes it seems to work if you press the Find button, but then a Change All is not going to work.)
    So that's why you have to insert at least one character in the Find What, and re-insert it in the Replace With fields.
    If all instances of the specific paragraph style need the prefixed text in a specific character style, consider redefining the paragraph style's autonumbering to include text and character style. Redefine the style, and all instances in the current document are changed. All future uses of the style automatically use the prefixed text and style. To update existing instances of the style in other documents with the new definition, use load paragraph styles; to apply the new definition to to other documents in an InDesign book, synchronize the styles. Search Google for terms like "InDesign paragraph styles numbered lists," "InDesign load styles," and "InDesign synchronize styles in book," without quotes for details.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • How to use data of multiline element from workflow container

    Hi,
    Can you please tell me how to access rows of multiline element of workflow container.
    Scenario is like below.
    I have values in a multiline container(table) of workflow container.
    Now inside Fork branches  i need to check for specific data in the above table and with that condition i have to send workitem.
    I hope u can understand,otherwise please revert.
    Thanks in advance,
    Madhu

    You cannot didrectly check the condition...
    what you have to do is.. write a inside the method as below and set the flag...and use the flag in condition editor...
    SWC_GET_TABLE CONTAINER 'AGENTS'  lt_agents.
    loop at lt_agents ino wa_agents.
    if wa_agents = 'A'.
    lv_flag = X.
    endif.
    endloop.
    SWC_SET_ELEMENT CONTAINER 'FLAG' lv_flag.
    Create an export parameter FLAG as char1 with export marked.
    Do the neccesary bindings from task to workflow.
    Then in workflow check this flag in condition editor.

  • 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\>.*$

Maybe you are looking for

  • Crystal Report with text(csv) data file, unable to connect on deployment.

    Hi I have a crystal report that connects to a text file using (Access/Excel DAO). Now I wrote a C# .net code that loads this report and change the file name to the text file to a different file using table.TableName and  table.Location to the new fil

  • Problem with view layout

    I'm working web dynpro for ABAP trying to duplicate a legacy system screen. I have 3 different types of addresses to display on the screen - Shipping, Billing, and Mailing.  What I want to do is arrange these addresses in 3 columns.  Each column woul

  • Data Execution Prevention preventing iTunes from working

    I have iTunes 8.0.2.20 running on Windows Server 2008 SP1. Whenever I plug in my iPod Nano, Data Execution Prevention (DEP) shuts down iTunes. I can't create an exception for iTunes in DEP since it gives the following error message: +"This program mu

  • Looking for Head_First_Plug-in_Development.pdf

    Hello all, I'm looking for the PDF originally found here:  http://blogs.adobe.com/ae-api/2006/07/stepbystep_xcode_project_creat.html which links to http://blogs.adobe.com/ae-api/files/ae-api/Head_First_Plug-in_Development.pdf but I get a 404 - File n

  • How to get "Layer Mask Hides Effects" from Photoshop Plug-in

    How to get "Layer Mask Hides Effects" from Photoshop Plug-in.