Forum Moderators: coopster

Message Too Old, No Replies

question ereg_replace

         

sneaks

11:43 pm on Jan 3, 2006 (gmt 0)

10+ Year Member



hi & happy new year.

my question:
i want to strip non alphanumeric characters except for spaces so i have:

$zobot = ereg_replace("[^a-z,A-Z,0-9,_]","",$zAction);

not sure how i keep the space... tried searching a bit around but i am not sure the term for those kind of 'operations' within the function?

take care
snx

jc_armor

4:56 am on Jan 4, 2006 (gmt 0)

10+ Year Member



try this pattern:

[^\w\s]