View Single Post
Old 12-03-2009, 02:28 AM   #1 (permalink)
h0ly lag
The Contributor
 
Join Date: Apr 2008
Location: Nevada, USA
Posts: 52
Thanks: 10
h0ly lag is on a distinguished road
Default Stripping non alpha numeric characters

This should work correct?

PHP Code:
ereg_replace('[^A-Za-z]',''$str); 
Because I am using it on a project that I need to strip any characters that are not alpha numeric, or if the string contains dash's or underscores that is ok too. But I can add that in later. I guess my problem is that It's not stripping '^' or '#'. I'm sure there are more characters its letting through. But those are the ones I've noticed so far.
__________________
Send a message via AIM to h0ly lag Send a message via MSN to h0ly lag
h0ly lag is offline  
Reply With Quote