Re: Validating a string
| From: | Charles Killian | Date: | Sun, 17 Sep 2000 01:02:45 +0000 |
| Subject: | Re: Validating a string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-17048@lists.php.net to get a copy of this message | ||
use ereg_replace().
$words = "the unpened wooden duck";
$new_words = ereg_replace("en[[:space:]]", $words );
Charles
----- Original Message -----
Sent: Saturday, September 16, 2000 5:43 AM
Subject: [PHP] Validating a string
Hello,
I want to validate a string. If the string ends on -en it should be
transformd to a new string whithout the -en.
For example:
$string = "broeken";
$string = validate($string);
-> now string had become "broek";
$string = "paard";
$string = validate($string);
-> nothing has happend to the string
How can I acomplish this ?
Kind regards,
Joachim