search within selected text

search within selected text

1
NewbieNewbie
1

    Sep 01, 2006#1

    I need a method to search within the text I have selected. More specifically within columns.
    Example I need to search for XY in the following text

    01234 [position]
    ------------
    ASSDF
    WERFS
    XYEXY
    AERED
    DVPXY
    ------------
    I put the editor into column mode and select the last two columns. I would like to find both instances of XY in position 3 and 4, but not XY in position 0 and 1.

    6,683583
    Grand MasterGrand Master
    6,683583

      Sep 02, 2006#2

      A search cannot be limited to a specifc range, whether in normal nor in column mode. Use a regular expression search. For example in UltraEdit style - see search configuration settings:

      Find: %???XY

      Well, it marks also the first 3 characters. But this should be no problem. A small macro could be used to mark only the 2 characters if this is really important:

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      Find RegExp "%???XY"
      IfFound
      EndSelect
      Key LEFT ARROW
      Key RIGHT ARROW
      StartSelect
      Key LEFT ARROW
      Key LEFT ARROW
      EndSelect
      EndIf

      Add UnixReOn or PerlReOn (v12+ of UE) at the end of the macro if you do not use UltraEdit style regular expressions by default - see search configuration. Macro command UnixReOff sets the regular expression option to UltraEdit style.

      Macro property Continue if a Find with Replace not found is not important for this macro, but better uncheck it.
      Best regards from an UC/UE/UES for Windows user from Austria

      1
      NewbieNewbie
      1

        Sep 12, 2006#3

        I'm going to request it as a feature, but here's how I do it now:

        Select the columns.
        Use Replace.
        Select "Selected Text" in the "Replace Where:" frame.
        Put what you want to find in the "Find What:" box.
        Tell it to Start, and just keep hitting Find Next.

        This has its drawbacks, such as today, when I was looking through a file of 355,000 lines with lots of occurances of what I needed to find (I really like the "List Lines Containing String" feature in the real Find command).
        I hope this takes care of your problem.

        2

          Oct 12, 2006#4

          MichaelF wrote:I'm going to request it as a feature, <SNIP>
          This would be a really useful thing for us.

          We use UE for working on PL/SQL packages which contain many individual functions/procedures etc. It would be great if you could easily search just one procedure for something.

          As it is now I just copy/paste the proc into another window to contain my search.