Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. $texto = 'Ex#em$!plo uti@!lizando r3gex';
  2. echo preg_replace('/[^w]/', '', $texto);
  3.  
  4. $chars = array('!', '@', '#');
  5. echo str_replace($chars, '', 'oh! texto com # e @ para apagar!');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement