fork(8) download
  1. <?php
  2.  
  3. $string = 'Você está bem? 123 # ! @ ...';
  4. echo preg_replace('/[^\w\s+$]/u', '_', $string);
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
Você está bem_ 123 _ _ _ ___