in reply to Re: regex to replace linefeeds with <p> tags
in thread regex to replace linefeeds with <p> tags

actually, i DO want to match "\r\n" (or "\n\r" for that matter).

the bottom line, is that i want to identify two+ linebreaks as a paragraph break, whether the linebreaks are \r or \n (or a mixture of both).

  • Comment on Re^2: regex to replace linefeeds with <p> tags

Replies are listed 'Best First'.
Re^3: regex to replace linefeeds with <p> tags
by ysth (Canon) on Dec 26, 2006 at 03:29 UTC
    But the behaviour you describe indicates that the user input is coming back as the sequence \r\n for a single line break.
      sorry - i know it's sloppy.

      i originally used the \r\n and it worked for awhile, but then started generating all the additional tags, so i was trying to make it more generalized.

      i think that the input usually has a CR from the word processor (which would be a \r), and then the user adds a second line feed in the form when they are inputting it - since i guess they see only one linefeed, and i have instructions to the user to separate paras by two lines....leading to the \r\n that i expected before, but maybe now they're doing something different?