On 12 Apr 2005 blackwater dev wrote:
> $good = "joh_'";
>
> // Let's check the good e-mail
> if (preg_match("/[a-z0-9]/", $good)) {
> echo "Good";
> } else {
> echo "Bad";
> }
>
> This returns Good, why?
That regex matches any string which contains at least one (lowercase)
lett
blackwater dev wrote:
I want to check a string for only numbers and letters but am banging
my head with regex:
ctype_alnum()
Chris
--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsu
I want to check a string for only numbers and letters but am banging
my head with regex:
$good = "joh_'";
// Let's check the good e-mail
if (preg_match("/[a-z0-9]/", $good)) {
echo "Good";
} else {
echo "Bad";
}
This returns Good, why?
Thanks!
--
PHP General Mailing List (http:
--- Ed Curtis <[EMAIL PROTECTED]> wrote:
> I've been looking at the docs and found preg_match and
> preg_match_all but these functions only seem to match 1
> specific search item. I want to make sure a variable (say
> $mlsnumber) contains only numbers and no spaces. What
> would I use to accomplish
John Nichel wrote:
Ed Curtis wrote:
I've been looking at the docs and found preg_match and preg_match_all but
these functions only seem to match 1 specific search item. I want to make
sure a variable (say $mlsnumber) contains only numbers and no spaces.
What
would I use to accomplish this?
Thanks
Ed Curtis wrote:
I've been looking at the docs and found preg_match and preg_match_all but
these functions only seem to match 1 specific search item. I want to make
sure a variable (say $mlsnumber) contains only numbers and no spaces. What
would I use to accomplish this?
Thanks
Ed
You really don't
Ed Curtis wrote / napĂsal (a):
I've been looking at the docs and found preg_match and preg_match_all but
these functions only seem to match 1 specific search item. I want to make
sure a variable (say $mlsnumber) contains only numbers and no spaces. What
would I use to accomplish this?
Thanks
Ed
I've been looking at the docs and found preg_match and preg_match_all but
these functions only seem to match 1 specific search item. I want to make
sure a variable (say $mlsnumber) contains only numbers and no spaces. What
would I use to accomplish this?
Thanks
Ed
--
PHP General Mailing List (
8 matches
Mail list logo