I need to check a form for illegal characters through a whitelist(list of allowed characters) with php. A function that could do this for me would be helpful...I can't find one on google...
to replace any occurrence of "#","$",or "%" with an empty string. Just put whatever characters you need to strip in there. If it's not a simple single character situation (i.e. you need to strip something like "<p>") then you'll have to go deeper into regex land to get there.
to replace any occurrence of "#","$",or "%" with an empty string. Just put whatever characters you need to strip in there. If it's not a simple single character situation (i.e. you need to strip something like "<p>") then you'll have to go deeper into regex land to get there.
Actually, sorry, that pattern is bad, use this instead
well what u did was the black list thing
and what i did is white one
it may look the same
but it is not!
Yes, I got it turned around, which I mentioned previously
Anyway, it does not matter. I posted to support that what you posted should work for him, he just needs to tune the pattern to include his acceptable characters
Last edited by Ezzaral; Jul 18th, 2007 at 1:19 pm.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.