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

Re: [Clip] Replace spaces

Expand Messages
  • Manuel
    ^!Replace WAS MANUEL Hi, all. And a question, please? How can I replace two or more spaces with a single space? Thanks in advance. ... Manuel
    Message 1 of 7 , Mar 2, 2001
      ^!Replace " " >> " " WAS

      MANUEL
      Hi, all.

      And a question, please?


      How can I replace two or more spaces with a single space?

      Thanks in advance.
      ---
      Manuel
      manuel123@...
      - Cursos por email:Windows,Navegador,Outlook,Html,Word,Excel,Access
      TambiƩn para ciegos.
      http://manuel123.8m.com
    • Wayne VanWeerthuizen
      On Sat, 3 Mar 2001 00:17:24 +0100, ... With a regular expression, replace - a space followed by one or more spaces - with a single space. These both do the
      Message 2 of 7 , Mar 2, 2001
        On Sat, 3 Mar 2001 00:17:24 +0100,
        "Manuel" <manuel123@...> wrote:

        >How can I replace two or more spaces with a single space?

        With a regular expression, replace - a space followed by one
        or more spaces - with a single space.

        These both do the exact same thing, just different ways
        of writing it. (Some people feel the brackets make it
        easier to see the spaces.):

        ^!Replace " +" >> " " WARS

        ^!Replace "[ ][ ]+" >> " " WARS




        --
        Wayne M. VanWeerthuizen
        Homepage: http://landru.myhome.net/wayne
      • Ben Geyer
        Hi Manuel, ... Here is a short loop that keeps on replacing two spaces with one until there are no more instances of two spaces: H=Replace excess spaces
        Message 3 of 7 , Mar 2, 2001
          Hi Manuel,

          On 3 Mar 2001, at 0:17, Manuel wrote:

          > MANUEL
          > Hi, all.
          >
          > How can I replace two or more spaces with a single space?

          Here is a short loop that keeps on replacing two spaces with one until there are
          no more instances of two spaces:

          H=Replace excess spaces
          ^!Replace " " >> " " AWS
          ^!IfError END ELSE Skip_-1

          I think that should work OK for you,

          Ben
        • Eric G.V. Fookes
          Hello Manuel, ... The fastest method is to use the Modify|Spaces|Single Space menu command. Regards, Eric G.V. Fookes Author of NoteTab, Mailbag Assistant, and
          Message 4 of 7 , Mar 3, 2001
            Hello Manuel,

            >How can I replace two or more spaces with a single space?

            The fastest method is to use the Modify|Spaces|Single Space menu command.


            Regards,
            Eric G.V. Fookes
            Author of NoteTab, Mailbag Assistant, and Album Express
            http://www.fookes.com/ and http://www.notetab.com/







            ...
          • Jody
            Hi Eric and Manuel, ... For some reason I was thinking that only did like one pass through at a time, but it does get them all. So, it may be quicker to do it
            Message 5 of 7 , Mar 3, 2001
              Hi Eric and Manuel,

              >> How can I replace two or more spaces with a single space?
              >
              >The fastest method is to use the Modify|Spaces|Single Space menu
              >command.

              For some reason I was thinking that only did like one pass
              through at a time, but it does get them all. So, it may be
              quicker to do it like that, but you have to use for your Clip if
              that is what you are using it in and most of us prefer to stay
              away from Keyboard commands when other commands are available:

              ^!Keyboard Alt+M S S

              A Clip on the default Clipbar for that is faster than manually
              doing it whether you use ^!Replace with RegExp or with a Skip_-1
              or ^!Keyboard. <g>

              I know what I was thinking of though and it was Trim Blanks under
              Modify | Lines. That is useful too at times, but again I prefer
              using Replace for better accuracy and precise spaces of lines.

              Happy Clip'n!
              Jody

              http://www.notetab.net

              Subscribe, UnSubscribe, Options
              mailto:Ntb-Clips-Subscribe@yahoogroups.com
              mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
              http://www.egroups.com/group/ntb-clips
            Your message has been successfully submitted and would be delivered to recipients shortly.