fork download
  1. <?php
  2.  
  3. $oldtext = "super.long.filename.tiff";
  4. $newtext = preg_replace('/^(.+)(\.)(.+)$/', '$1-150*150$2$3', $oldtext);
  5. echo $newtext;
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
super.long.filename-150*150.tiff