fork download
  1. <?php
  2. $string = "Marshawn Lynch is amazing. A M A Z I N G!";
  3. $regex = "~(?<=[A-Z])\s(?=[A-Z])~";
  4. $string = preg_replace($regex, "", $string);
  5. echo $string;
  6. ?>
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
Marshawn Lynch is amazing. AMAZING!