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

4585Re: trying to remove some spaces at the end of a line

Expand Messages
  • Craig
    Sep 5, 2000
    • 0 Attachment
      --- In ntb-clips@egroups.com, Jody <KJB1611@a...> wrote:
      > Hi Claes and Larry,
      >
      > >Since the discussion seems to drift towards code efficiency,
      > >wouldn't the following be rather straightforward, eliminating at
      > >least one loop?
      >
      > Your's is the shortest. ;) I still like the first one I posted
      > though, because it does not use Keyboard; just a think with me -
      > personal preference for the most part. I guess it sounds too
      > much like having to take my hand off the mouse and actually use a
      > keyboard shortcut. <g>
      >
      > H=Regards /Claes
      > ^!SetScreenUpdate Off
      > ^!TOOLBAR Select All
      > ; compliments of Larry ;)
      > ^!KeyBoard ALT+M A L ALT+M L T
      > ^!Jump 1
      > :next_record
      > ^!Replace "^p" >> "|" S
      > ^!Replace "^p" >> "|" S
      > ^!Replace "^p" >> "|" S
      > ^!IfError End
      > ^!Jump +1
      > ^!Goto next_record

      <SNIPALOT>

      Howdy, All -
      Just to add one more, since I didn't see any regex'es :-)

      H="nospace 2 pipe"
      :Begin1
      ^!Set %i%=1
      :Loop4
      ^!IfError End
      ^!Replace "\s*\n" >> "|" R
      ^!Inc %i%
      ^!If "^%i%" < "4" Loop4 Else done4
      :done4
      ^!Jump +1
      ^!GoTo Begin1
    • Show all 15 messages in this topic