I have 2 things which I need members help.

(Q1)    How to put these three substitutions into one single substitution
regex.
$a =~s/</lt/;
$a =~s/>/gt/;
$a =~s/\\n/<br>/;

(Q2)    How to do the following :-
           If there are 2 spaces, I wish to convert it into 1 &nbsp like
this =>&nbsp
           3 spaces into 2 &nbsp like this => &nbsp&nbsp
           4 spaces into 3 &nbsp like this => &nbsp&nbsp&nbsp
           and so on.....

I can only think of this undermentioned example but does not know how to fit
it into the above Q2 :-
$a =~s/ /&nbsp/;

Thanks.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to