How to select everything between two predefined strings in different lines?

How to select everything between two predefined strings in different lines?

2

    Jul 15, 2006#1

    I need to select everything between two predefined strings in different lines.

    See sample:

    Code: Select all

    <SYN>
    <SYN-MAIN>&sect;&ensp;1.01 The Dictionary Definitions
    <SYN-SUB1>[1] ``Toxic''</SYN-SUB1>
    </SYN-MAIN>
    <SYN-MAIN>&sect;&ensp;1.03 Other Necessary Concepts
    <SYN-SUB1>[1] Human Body is Not a Laboratory Beaker</SYN-SUB1>
    <SYN-SUB1>[2] Individual Variables
    <SYN-SUB2>[a] Guidelines are Hard to Set</SYN-SUB2></SYN-SUB1>
    <SYN-SUB1>[3] Drug/Toxin Interactions</SYN-SUB1></SYN-MAIN>
    <SYN-MAIN>&sect;&ensp;1.04 ``Forensic Toxicology'' and ``Toxico-Legal''</SYN-MAIN>
    </SYN>
    I like to select all lines from <SYN-MAIN> to </SYN-MAIN>. Is this possible in macro?

    6,675585
    Grand MasterGrand Master
    6,675585

      Re: HELP how to select two predefined text in different line

      Jul 15, 2006#2

      Sure, that's very simple.

      ColumnModeOff
      HexOff
      Find "<SYN-MAIN>"
      StartSelect
      Find Select "</SYN-MAIN>"
      ...do something like Copy, Cut, Delete or HideOrShowLines
      EndSelect

      In the help of UltraEdit at topic Find command you can read the sentence:
      To select all text between the cursor position and the search target, hold down the SHIFT key at the time the search is started with the Find Next button.
      Exactly that I have done while recording the macro.

      This trick - holding the SHIFT key while pressing the button - works also for Goto Bookmark, Goto Page and Goto Line.
      Best regards from an UC/UE/UES for Windows user from Austria

      2

        Re: HELP how to select two predefined text in different line

        Jul 15, 2006#3

        Thanks Mofi...! :D