php3-list | 199903
Date: 03/25/99
- Next message: Jeff Fox: "[PHP3] NT authorization from PHP under Linux?"
- Previous message: CIMPOESU Teodor: "Re: [PHP3] ...no subject..."
- In reply to: CIMPOESU Teodor: "Re: [PHP3] ...no subject..."
- Next in thread: CIMPOESU Teodor: "Re: [PHP3] Strip chars from string"
- Reply: CIMPOESU Teodor: "Re: [PHP3] Strip chars from string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 25 Mar 1999, CIMPOESU Teodor wrote:
> > The following doesn't seem to work :
> >
> > $stripped = ereg_replace("@$#^&*()", "'", $input);
> >
> most of those chars are special for a regex.You must escape them:
> ereg_replace("[@ | \$ | # | \^| \& | \* | \( | \)]+","",$input)
$stripped = ereg_replace("[@$#^&*()]", "", $input);
Will be fine.
-adam
-- / adam maccabee trachtenberg | visit college life online \ \ adam <email protected> | http://www.student.com /-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3 List administrator: zeev-list-admin <email protected>
- Next message: Jeff Fox: "[PHP3] NT authorization from PHP under Linux?"
- Previous message: CIMPOESU Teodor: "Re: [PHP3] ...no subject..."
- In reply to: CIMPOESU Teodor: "Re: [PHP3] ...no subject..."
- Next in thread: CIMPOESU Teodor: "Re: [PHP3] Strip chars from string"
- Reply: CIMPOESU Teodor: "Re: [PHP3] Strip chars from string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

