RE: [PHP-DB] Regular Expressions

From: Date: Sun, 07 Apr 2002 20:17:54 +0000
Subject: RE: [PHP-DB] Regular Expressions
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18297@lists.php.net to get a copy of this message
What are you trying to do? an where is your pattern? are you trying to match any character followed by 2 to 20 any characters in the $string variable? Gurhan -----Original Message----- From: Ilhan Guvener [mailto:crushingday@lycos.com] Sent: Sunday, April 07, 2002 11:33 AM To: php-db@lists.php.net Subject: [PHP-DB] Regular Expressions 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. See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201 /splash.asp -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#18297) next »