fork download
  1. <?php
  2. $text = "April fools day is 04/01/2002\n";
  3. // the callback function
  4. function next_year($matches)
  5. {
  6. return "hello";
  7. }
  8. "|(\d{2}/\d{2}/)(\d{4})|",
  9. "next_year",
  10. $text);
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
April fools day is hello