Loading ...
Sorry, an error occurred while loading the content.

23795Re: [Clip] Sorting and aligning a list

Expand Messages
  • flo.gehrke
    May 22, 2013
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
      > I think that can be simplified:
      > ^!Replace "^(.*)$" >> " $1" WRASTI
      > ^!Replace "^ *?([ \d]{5}) (.+?)$" >> "$1 $2" WRASTI
      > Then sort...

      Thanks, Axel. That's working almost perfectly.

      However, I think we could improve it a bit. Here's the solution I've been playing with so far:

      ^!Replace "^" >> "\x20\x20\x20\x20" WARS
      ^!Replace "^\x20+?(.{3}\d\b)" >> "$1" WARS
      ^!Select All

      The advantage is that it doesn't store the names and needs no back reference to the names. So the engine also needs less steps to achieve a match.

      In my view, there is still a problem with both clips: They don't work with numbers of ANY length. What's still missing is an easy instruction that will automatically adapt the clip to the highest number.

      Of course, this could be added with some more command lines -- but I'm still curious to see a solution that matches numbers of any length "at one go"...

    • Show all 13 messages in this topic