Sublime directory Surf the web anonymous Pagerank Monitor


Removing Unwanted Characters Using ereg_replace

vbignacio
Mon 12 March 2007, 03:02 am GMT +0100
Please tell me how i can remove a series of characters using ereg_replace.

So far, i've been successful in removing one character only using this:

$string = ereg_replace('\"', '', $string);

What should i add so i could remove all characters and just retain the letters and numbers only?

thnks!

vbignacio
Mon 12 March 2007, 04:11 am GMT +0100
got it already:

$string = ereg_replace("[^a-zA-Z0-9\s ]", '', $string);

Nikolas
Mon 12 March 2007, 08:03 am GMT +0100
Good.

Looks like you have started to learn man :)

vbignacio
Tue 13 March 2007, 07:15 am GMT +0100
you know me, always giving myself problems to solve.

Nikolas
Tue 13 March 2007, 11:59 am GMT +0100
you know me, always giving myself problems to solve.

That's the attitude I like :)

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional