|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi guys,
is there any one around tell me how to make two carriage return become html break line tags in the text file? I couldn't figure it out, please help thanks in advance |
|
#2
|
|||
|
|||
|
$var =~ s/n{2}/<br><br>/g;
|
|
#3
|
|||
|
|||
|
Actually, this page line breaks, not carriage returns:
$var =~ s/r//g; $var =~ s/n/<br>/g; that will replace returns (when the press Enter) with nothing, and line breaks with <br>'s.. not matter now many line breaks there are. [This message has been edited by JonLed (edited August 30, 2000).] |
|
#4
|
|||
|
|||
|
Jon,
Nice catch on the carriage returns, I forgot about that. I think you might have one too many <br>s in your second RE though. |
|
#5
|
|||
|
|||
|
thanks a lot, it worked.
|
|
#6
|
|||
|
|||
|
Yeah, you where right. Fixed now.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > how to make two carriage return became html break line tag? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|