CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
stripping <p> and <br> from a textarea

 



Caoimhin
New User

Nov 14, 2002, 12:02 PM

Post #1 of 2 (400 views)
stripping <p> and <br> from a textarea Can't Post

I have a form that is filled out and when displayed as lines displays fine. However, I want to display it in a textarea and when I do that data displays the <br> and <p> characters. In the code is a routine that is supposed to strip them, and apparently does because as I said if I just print the variable, its fine. How do I get these characters out of my textarea? Here is a sample of what I am talking about.

http://www.kjcrowley.com/drforum/example.html

Thanks.


Paul
Enthusiast

Nov 14, 2002, 1:29 PM

Post #2 of 2 (397 views)
Re: [Caoimhin] stripping <p> and <br> from a textarea [In reply to] Can't Post


Code
$data =~ s/<br>/\n/ig; 
$data =~ s/<p>/\n\n/ig;



(This post was edited by RedRum on Nov 14, 2002, 1:30 PM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives