Can anyone help me out with a regular expression to remove all non-ascii
characters from a String?

I've got as far as:

$newfilecontents = ereg_replace("[^\x01-\x7f]","",$newfilecontents);

but this seems to strip all the characters from the String!

Any help would be appreciated. Thanks.


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**********************************************************************

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to