fork(1) download
  1. <?php // http://stackoverflow.com/a/15532671/1238344
  2. $jud = 'Briney Spears 12 2009';
  3. $rep = array('', 'By', 'Gun', 'Fast');
  4.  
  5.  
  6. array_merge( array('/20(0[\d]|1[1-2])/'),
  7. array_map( function($foo){
  8. return "/{$foo}(?![\d]{2,})(?!$)/";
  9. }, array_keys($rep))),
  10. array_merge( array('2013'), $rep ), $jud, 1);
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
Briney Spears ByGun 2013