Re: eregi

From: Date: Tue, 02 Oct 2001 19:10:44 +0000
Subject: Re: eregi
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69621@lists.php.net to get a copy of this message
on 10/2/01 8:51 AM, CC Zona at cczona@nospam.invalid wrote: > In article <B7DE995A.1676B%php-l@bakednotfried.com>, > php-l@bakednotfried.com (Mike Cullerton) wrote: > >> eregi("^[a-z0-9_\-]+$",$string) >> >> notice that i had to escape the dash with a backslash > > Are you sure? 'Cuz AFAIK, escaping shouldn't be necessary on a hyphen > which is the last char (or, IIRC, the first) of a character class. cool. so, are you saying eregi("^[-a-z0-9_]+$",$string) should work? thanks, mike -- mike cullerton

« previous php.general (#69621) next »