Re: Another Regex Question (General)

From: Date: Wed, 03 Jul 2002 16:12:47 +0000
Subject: Re: Another Regex Question (General)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-105232@lists.php.net to get a copy of this message
On Wednesday, July 3, 2002, at 12:00 PM, Martin Clifford wrote:
Does [a-zA-Z0-9] (yes, I know [:alnum:] is the same) mean that there can be a number, but it has to follow a letter? Or would you just do [a-zA-Z][0-9] to do that?
That bracketed construction is called a character class. It represents any *one* of the contained characters. But not more than one. So there is no following at all, since for all intents and purposes the character class matches a single character (unless you use a qualifier like +, ?, or *). Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com

« previous php.general (#105232) next »