CodeIgniter Forums
Regexp: replace all except aplha - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Regexp: replace all except aplha (/showthread.php?tid=6707)



Regexp: replace all except aplha - El Forum - 03-09-2008

[eluser]nirbhab[/eluser]
Hi all,
Code:
echo preg_replace("/^([^a-z])+$/i",' ','nirbhab#$#%$^');

above is my code, i just want to replace all(except alpha chars) through regular expression.
new to regexp.