ID:               21922
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: all
 PHP Version:      4.2.3
 New Comment:

Have a look at the preg_replace function, which can do all kinds of
this, e.g. try:

echo preg_replace("/[[:alpha:]]/","","123hi456ho");

echo preg_replace("/[^[:alpha:]]/","","123hi456ho");


Previous Comments:
------------------------------------------------------------------------

[2003-01-28 09:14:01] [EMAIL PROTECTED]


Hi,
I was just in the #php irc channel and I asked 'how to strip all
non-text characters from a string'
and two minutes later another guy comes in and asks the same q',

there is 'trim()' but it only does starts and ends,

there is a function in unix that is called 'strings' that does approx
this,

can you look into it do you think,

and if you do, maybe make it so it can be used the other way around too
(strip all text),

maybe call it 'strip_notext' or so

thanks,

Re



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21922&edit=1

Reply via email to