fork download
  1. <?php
  2.  
  3. //exemplo 1
  4. $str = 'HELIANE HELIAS';
  5. $str = preg_replace('/\bHE/','E', $str);
  6. echo $str. PHP_EOL;
  7.  
  8. //exemplo 2
  9. $str = 'GHELIANE GHELIAS';
  10. $str = preg_replace('/\bHE/','E', $str);
  11. echo $str;
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
ELIANE ELIAS
GHELIANE GHELIAS