preg_replace: replace date : Replace « String « PHP






preg_replace: replace date

<?
$t = "25/12/99, 14/5/00";
$t = preg_replace( "|\b(\d+)/(\d+)/(\d+)\b|", "\\2/\\1/\\3", $t );

print "$t<br>";

?>
           
       








Related examples in the same category

1.the m modifier to change the behavior of $