From owner-freebsd-questions@FreeBSD.ORG Tue Feb 28 19:16:09 2006 Return-Path: X-Original-To: freebsd-questions@FreeBSD.ORG Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C23016A420 for ; Tue, 28 Feb 2006 19:16:09 +0000 (GMT) (envelope-from fbsd_user@a1poweruser.com) Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C8E243D46 for ; Tue, 28 Feb 2006 19:16:08 +0000 (GMT) (envelope-from fbsd_user@a1poweruser.com) Received: from barbish ([69.172.31.117]) by mta11.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with SMTP id <20060228191607.VFBE17101.mta11.adelphia.net@barbish> for ; Tue, 28 Feb 2006 14:16:07 -0500 From: "fbsd_user" To: "freebsd-questions@FreeBSD. ORG" Date: Tue, 28 Feb 2006 14:16:06 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Cc: Subject: Help with PHP eregi alnum if statement X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: fbsd_user@a1poweruser.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2006 19:16:09 -0000 I am trying to test the login id entered from a form. Checking that the contents are upper or lower case alpha or numeric 0-9 plus the special characters - dash and # pound sign Code: if(eregi("([[:alnum:]\#\-]+)", $loginid)) { print("loginid is alnum"); } else { print("loginid is not alnum"); } I get the message "loginid is alnum" no matter what I enter to test. What is wrong with the statement syntax that it don’t work correctly? Thanks for your help