<?php
$text = "April fools day is 04/01/2002\n";
// the callback function
function next_year($matches)
{
return "hello";
}
"|(\d{2}/\d{2}/)(\d{4})|",
"next_year",
$text);
PD9waHAKJHRleHQgPSAiQXByaWwgZm9vbHMgZGF5IGlzIDA0LzAxLzIwMDJcbiI7Ci8vIHRoZSBjYWxsYmFjayBmdW5jdGlvbgpmdW5jdGlvbiBuZXh0X3llYXIoJG1hdGNoZXMpCnsKICByZXR1cm4gImhlbGxvIjsKfQplY2hvIHByZWdfcmVwbGFjZV9jYWxsYmFjaygKICAgICAgICAgICAgInwoXGR7Mn0vXGR7Mn0vKShcZHs0fSl8IiwKICAgICAgICAgICAgIm5leHRfeWVhciIsCiAgICAgICAgICAgICR0ZXh0KTs=