Search/Select Multiple Lines

Search/Select Multiple Lines

14
Basic UserBasic User
14

    Nov 08, 2006#1

    I have a text file report that is generated by some engineering software that I'm trying to insert page-breaks into at certain locations. That part is working fine, but I want to add the header (which the engineering software adds to the top of the file only) right after each new page break.

    The header is followed by two blank lines at the top of the report. I thought I'd just select all the text from the top of the file to the end of the two blank lines and then copy that selection to the clipboard. I can't seem to get UE to search/select to the first occurrence of two successive blank lines. I have tried having the macro look for "%^p%^p" with no luck. UE always seems to just select the first line of the header and that's it.

    Here is a sample of the header:

    Code: Select all

    Project:     IN20060894
    Subject:
    Job No.      894              Operator: DW
    Date:        Tuesday  November 7, 2006  11:17 am
    
    SYSTEM FIX 4 ASEC 2 BEAR PRI 0 RED NE STA 3 FILE: 'CHNS'
    --blank line #1--
    --blank line #2--  *** I want to end selection here ***
    Thanks for any suggestions!

    6,686585
    Grand MasterGrand Master
    6,686585

      Nov 09, 2006#2

      The function Find + Select from current cursor position till end of found string or extend current selection till end of found string seems to be overlooked by many users although it is explained at help for the Find function and the macro command Find. Here is the macro part you need:

      Top
      StartSelect
      Find Select "^p^p^p"
      Copy
      EndSelect

      You can use the copied header directly when you insert the page break with a find+replace. The page break has the code ^b and the code for the text in the current clipboard is ^c.
      Best regards from an UC/UE/UES for Windows user from Austria

      14
      Basic UserBasic User
      14

        Nov 09, 2006#3

        Thanks, Mofi!

        I actually managed to figure that out before I read your post, but I wanted to thank you just the same.

        I still think there's something wrong with the Find Select method I was using before, but since this other method does the trick I won't worry about it.

        Cheers!!