please help : tricky "$" replacement problem in a
Posted: Wed Oct 22, 2003 9:08 pm
I want any $ entered in text area to be converted to "dollars" on submission
However if there is any hyperlink containing $ like ( http: // localhost/index.php?subject=view&msg=$msg23 )
I want that $ to be preserved otherwise the link wont work.
Everytime I try with eregi and all that both gets converted to dollar
any help will be highly appreciated - best wishes and regards
ps : the subject of the htread was' please help : tricky "$" replacement problem in a string' however the word 'string' is getting filtered out
However if there is any hyperlink containing $ like ( http: // localhost/index.php?subject=view&msg=$msg23 )
I want that $ to be preserved otherwise the link wont work.
Everytime I try with eregi and all that both gets converted to dollar
Code: Select all
$message= str_replace( "$", "dollar",$message);
$message = eregi_replace("(([hH][tT][tT][pP]://)(www\.)?([a-z0-9_-]+(\.[a-z0-9_-]+)+)(/[^/ \n\r]*)*)","<a href=\\1 target=new><img src =0smli-hand.gif border=0></a>",$message);ps : the subject of the htread was' please help : tricky "$" replacement problem in a string' however the word 'string' is getting filtered out