fork download
  1. <?php
  2.  
  3. $string = "customer-service/tweep/cs/gsergsergrs/2017-20190Course-Schedule.pdf";
  4. echo preg_replace('~[^/]+/~', "---/", $string);
Success #stdin #stdout 0.03s 23872KB
stdin
Standard input is empty
stdout
---/---/---/---/2017-20190Course-Schedule.pdf