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

Re: Deleting control line feed in string

Expand Messages
  • A.J.Mechelynck
    ... Jean-René, I think you and I don t understand Stefan s question the same way, so let s ask: Stefan: Does your string contain backslash-n (two characters),
    Message 1 of 3 , Jan 30, 2007
    • 0 Attachment
      Jean-Rene David wrote:
      > * Mueller Stefan [2007.01.30 07:56]:
      >> How can I delete a control line feed in a string
      >
      > :s/\\n//
      >
      > Should do what you want. Insert range as
      > appropriate.
      >
      > Or
      >
      > :let value = substitute(string, "\\\\n","","g")
      >
      > :h substitute()
      >
      > Discusses this specific case.
      >
      > HTH,
      >

      Jean-René, I think you and I don't understand Stefan's question the same way,
      so let's ask:

      Stefan: Does your string contain backslash-n (two characters), in which case
      Jean-René's solution should work, or does it contain ^J (0x0A aka linefeed,
      one control character) in which case we should try "\n" instead, and try to
      find something else if it doesn't work?


      Best regards,
      Tony.
    Your message has been successfully submitted and would be delivered to recipients shortly.