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

23794Re: [Clip] Sorting and aligning a list

Expand Messages
  • flo.gehrke
    May 22 6:29 AM
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, Art Kocsis <artkns@...> wrote:
      >

      > Nothing canned but how about this:
      >
      > ^!Replace "^\h*?\K(\d+?)(?=\h\w)" >> "000000000$1" AIRSW
      > ^!Replace "^\d*?\K(\d{10}(?=\h\w)" >> "$1" AIRSW
      > ^!Select ALL
      > ^!Toolbar "Sort Ascending"
      > ^!Replace "^000000000([1-9])" >> " $1" AIRSW
      > ^!Replace "^00000000([1-9])" >> " $1" AIRSW
      > ^!Replace "^0000000([1-9])" >> " $1" AIRSW
      > .
      > .
      > ^!Replace "^0([1-9])" >> " $1" AIRSW

      Thanks for your proposal! But let me point out some inconsistencies in your clip:

      > ^!Replace "^\h*?\K(\d+?)(?=\h\w)" >> "000000000$1" AIRSW

      What are you trying to match with '^\h*?'- in the beginning, all lines start with a number.

      > ^!Replace "^\d*?\K(\d{10}(?=\h\w)" >> "$1" AIRSW

      Syntax error - closing bracket missing after '{10}'. If corrected, it replaces 10 digits with the same 10 digits - that has no effect.

      > ^!Replace "^000000000([1-9])" >> " $1" AIRSW
      > ^!Replace "^00000000([1-9])" >> " $1" AIRSW

      Can't work - you've replaced all zeros with spaces already

      Even when making this work -- in the end, the lines will be (nearly) the same as before because there is no command that will stop removing one space after the other as soon as the clip has achieved the intended alignment.

      Regards,
      Flo
    • Show all 13 messages in this topic