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

Re: [Clip] Re: How to delete newlines

Expand Messages
  • Alec Burgess
    Allan: ... (in ... My guess is it s not really a bug because with only one character on a line, the single character of the next line has already been used
    Message 1 of 9 , Nov 16, 2001
    • 0 Attachment
      Allan:
      re:
      > >^!replace "{[^\"]}\n{[^\"]}" >> "\1\2" RWAS
      > >in words: any char not a quote followed by new-line followed by any
      > >character not a quote: replace by the first char followed by the second.
      (in
      > >regexp "\n" is the same as "^p" in non-regexp (=<CR>+<LF>)

      Your "counter-example":
      > "String 1","String 2","String 3"
      > "String
      > 1","String 2","String 3"
      > jjj
      > lll*
      > *
      > *
      > *
      > *

      My guess is it's not "really" a bug because with only one character on a
      line, the single character of the next line has already been "used" up when
      its put back on the preceding line, hence doesn't get considered for
      matching on the next "cycle".
      THE MOVING FINGER, HAVING WRIT MOVES ON .... ;==)

      I put the 26 letters of the alphabet 1 per line, and executed the above
      clip. It converted to 13 lines, 2 letters per line. Executing the clip on
      THAT, got rid of ALL the linebreaks and gave me ONE line with all 26 letters
      on it.

      However changing the clip to:
      ^!replace "{[^\"]}\n" >> "\1" RWAS
      DOES do it all in one pass.

      Don'tcha just love regexps!

      Regards ... Alec
      ----- Original Message -----
      From: "Alan C." <acummings@...>
      To: <ntb-clips@yahoogroups.com>
      Sent: 16 November, 2001 22:13
      Subject: Re: [Clip] Re: How to delete newlines
    Your message has been successfully submitted and would be delivered to recipients shortly.