in reply to Replacing new line characters from HTML TEXTAREA submissions
At the end of each line, the \r, is just moving the cursor back to the beginning of the line and writing the next line right over the top of the previous one. Smash each of those lines right over the top of the previous line and by the time you get to the end, you have: <p>Bye Bye.a test. Once you see that, you are probably clear that your regex should be: $info =~ s/\r\n/<p>/g; Hope that helps. (Actually, you probably didn't need anything past the heads-up in the first line or two of this post.) And if you are not on Windows, then I don't have a clue! ;-) MSgremlins, perhaps...Hello,\r <p>\r <p>This is a test.\r <p>\r <p>Bye Bye.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Replacing new line characters from HTML TEXTAREA submissions
by Anonymous Monk on Mar 16, 2001 at 15:32 UTC |