fork(1) download
  1. <?php
  2.  
  3. $str = "m,.o,e.d...a";
  4. $resposta = preg_replace('#[^a-z0-9]#', '', $str);
  5.  
  6. var_dump($resposta);
  7.  
  8. $str = "m#o#e#d#a";
  9. $resposta = preg_replace('#[^a-z0-9]#', '', $str);
  10.  
  11. var_dump($resposta);
Success #stdin #stdout 0s 82944KB
stdin
Standard input is empty
stdout
string(5) "moeda"
string(5) "moeda"