home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

regular expressions/javascript/replace

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1626
Discussions: 200,925, Posts: 2,379,126, Members: 246,291
Old July 26th, 2005, 04:07 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Jul 2005
Posts: 2
regular expressions/javascript/replace

Hello,
I'm currently trying to display some text in a textarea, and later in just regular html on different jsp pages. To do this I have to convert from \n to <br/>, and then back from <br/> to \n. To do the former one I do
text = text.replace(/\n/g, "<br />");
which works correctly, but when reversing it,
…replace("<br />", \n);
The \n disappears and it does not line break.
the way replace works is it does replace(reg exp, string).
so how would this be done?


Thanks,
David
Aikon3390 is offline   Reply With Quote
Old July 26th, 2005, 04:35 PM     #2 (permalink)
Ultimate Member
 
elmers's Avatar
 
Join Date: Sep 2003
Location: Philadelphia
Posts: 1,484
You broke our recent discussions. BAD!
elmers is offline   Reply With Quote
Old July 26th, 2005, 04:37 PM     #3 (permalink)
Senior Member
 
Micky758's Avatar
 
Join Date: Jan 2005
Location: UK
Posts: 541
cool 2nd post and you've broke TIMO - you vandal
Micky758 is offline   Reply With Quote
Old July 26th, 2005, 04:48 PM     #4 (permalink)
Ultimate Member
 
erhan28's Avatar
 
Join Date: Aug 2004
Location: SouthWest, Florida
Posts: 1,445
Send a message via MSN to erhan28 Send a message via Yahoo to erhan28
nice .
__________________
MSI K8N Neo4 Platinum / A64X2 4800+ Toledo(Stock)
7900GTX 698mhz / 2GB Corsairs XMS PRO Dual
Hitachi SATA II (2x 250GB, 1x 500GB)
ASUS G1
erhan28 is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace KT133MB, processor & memory or just replace nForce2MB? videobruce Motherboards 2 January 6th, 2005 11:17 AM
6600GT That Much Better Than Regular? lablkilz699 General Tech Discussion 9 December 14th, 2004 03:52 AM
Help with a regular expression rofranco Webmastering and Programming 3 November 12th, 2004 02:51 PM
Regular Expressions omalleytrading Webmastering and Programming 3 November 9th, 2004 11:11 AM
Should I get regular or XP?? ben-the-slacker Processors, Memory, and Overclocking 12 December 22nd, 2001 11:51 AM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2865)
Obama the Muslim (14)
Is the PSU I received dead? (10)
windows vista security holes (9)
Foreign voltage (10)
Install XP pro and a Vista laptop ?.. (10)
HIS HD5770 graphic card question (15)
Print spooler problem (13)
Dept. of HS: NSA 'Helped' Develop V.. (15)
A good PSU? (10)
New Computer wont recognize XP disc (7)
Ideal cheap graph card for PC-Gamin.. (15)
EVGA 9800 gtx help with finding a g.. (8)
World's largest Monopoly Game using.. (331)
Recent Discussions
Have you switched yet? (84)
Install XP pro and a Vista laptop ?? (10)
Wireless Router+Cable Modems and Much.. (0)
Optical Audio A-B Switch (1)
windows vista security holes (9)
Fire in DVD (0)
radeon x850xt platinum & shader 3 (2)
The NTDVM CPU has encountered an ille.. (24)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (34)
Wireless speakers for PC? (11)
Print spooler problem (13)
Help getting around port 80 for camer.. (2)
Display shows 3x5 inch in middle of s.. (3)
monitor will not turn on at all, (1)
World's largest Monopoly Game using G.. (331)
Foreign voltage (10)
FiOS modem/router interfering with ne.. (7)
Browsers wont load websites (2)
Virus Doctor Popup? (1)
Dept. of HS: NSA 'Helped' Develop Vis.. (15)
EVGA 9800 gtx help with finding a goo.. (8)
Modern Warfare For the PC (32)
Problem with speed step/turbo boost? (1)
Modern Warfare 2: Who Bought It? (61)
SIS 740 and Widescreen (8)


All times are GMT -4. The time now is 12:36 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28