Re: Regular Expressions
| From: | Jason Wong | Date: | Sun, 07 Apr 2002 18:10:36 +0000 |
| Subject: | Re: Regular Expressions | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18292@lists.php.net to get a copy of this message | ||
On Sunday 07 April 2002 23:32, Ilhan Guvener wrote:
> Hello
>
> I'm writing a code for limiting a string input and for that I'm using reg.
> ex. but I have a problem:
>
> $string = "emramile";
> if(!(preg_match("/.{2,20}/","$string"))) {
> print "error";
> }
> else {
> print "OK";
> }
>
> I wrote this code but it's not working. I couldn't find what the problem
> is. I'll be glad if anybody help me.
1) What is your regex supposed to do?
2) HOW doesn't it work?
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Life is like a 10 speed bicycle. Most of us have gears we never use.
-- C. Schultz
*/