Search by position

Search by position

2
NewbieNewbie
2

    Aug 25, 2005#1

    I have a file with many rows and would like to do a search in all rows that contain the letters PK in positions 94-95 of each row then display each complete row that contains this value in new window.

    I know this is going to be really easy but I new to UE and I'm spending too much time trying to figure it out. Help!

    Thanks Jody

    30
    Basic UserBasic User
    30

      Aug 26, 2005#2

      If you're doing this just to find information (and don't plan on making any changes that you'll want to save), I've found the file sort feature very usefull for this.

      File->Sort->Advanced Sort options:

      Just put columns 94 and 95 in the two fields for 'Key 1', click 'Sort' and all lines in the file will be sorted by those two columns. Just scroll down until the column shows PK and they'll all be grouped right there.

      2
      NewbieNewbie
      2

        Aug 26, 2005#3

        Thanks for the reply. My delima is the file is very large (254,000) rows. Sorting by a column takes a long time. I need a faster way to do this. Any other suggestions?

        Thanks Jody

        206
        MasterMaster
        206

          Aug 26, 2005#4

          This is ugly, but it works.

          Use this for your search string:

          ^.............................................................................................[P][K].*$

          Have List Lines Containing String and Regular Expressions checked
          Unix-style regular expressions

          You can copy the found lines to the clipboard

          I tested a 250,000-row file on my P4-1.6 laptop - took 120 seconds
          Software For Metalworking
          http://closetolerancesoftware.com

          112
          Power UserPower User
          112

            Aug 26, 2005#5

            LOL,

            "Don't force it, use a bigger hammer!"

            I like it!

            Cheerz,
            Paolo
            There is no such thing as an inconsistently correct system...
            Therefore, aim for consistency; in the expectation of reaching correctness!