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

24303Re: [Clip] Re: cleaning extra spaces

Expand Messages
  • Don
    Jan 18, 2014
    • 0 Attachment
      On 1/18/2014 3:54 PM, Peter Hulm wrote:
      > You guys are magnificent. John even spotted something I knew but forgot: that I want to replace the carriage returns with a space rather than simply suppress it. And yes, you are right, the email reformatted the text so that it appeared as it should.
      >
      > The code you gave me: ^!Replace "[^>\x20]\K\x20*\R+\x20*" >> "\x20" ARSW worked with one problem. The spaces vanished but so did all the line breaks. When I ran it through a web editor, however, these reappeared. It did its own beautifying, and when I reopened the saved text in NoteTab all was fine.
      >
      > I can live with this two-step approach, if there is no alternative, but I am puzzled why [^`>] still replaced the linebreaks after >, and I don't really understand \K or should it be \K\20.
      >

      \K means do not capture (thus don't select or replace) what precedes it.

      [^whatever] means NOT whatever. So it is taking anything other than a
      space which is what \x20 means and anything other than a > followed by
      none or more spaces and any return \R or more followed by zero or more
      spaces.
    • Show all 17 messages in this topic