String replace with Regular Expressions : String Replace « String « PHP






String replace with Regular Expressions


<?
$old_string = "I really love programming in ASP!";
$new_string = ereg_replace("ASP", "PHP", $old_string);
echo "$new_string";
?>
           
       








Related examples in the same category

1.Quantifier Syntaxes
2.str_replace: @ (at)
3.Replacing a Pattern with a Found String
4.Replace the tag content without getting rid of any attributes
5.What happens when multiple instances of the search string overlap?
6.String replace: index and value