Regular expression to remove non-ascii text from a string

From: Date: Thu, 11 Mar 2004 15:17:57 +0000
Subject: Regular expression to remove non-ascii text from a string
Groups: php.windows 
Request: Send a blank email to php-windows+get-23104@lists.php.net to get a copy of this message
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. **********************************************************************

« previous php.windows (#23104) next »