Re: [PHP] Another Regex Question (General)

2002-07-03 Thread Analysis & Solutions

On Wed, Jul 03, 2002 at 12:00:50PM -0400, 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?

Your second question/statement is correct.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Another Regex Question (General)

2002-07-03 Thread Erik Price


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
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Another Regex Question (General)

2002-07-03 Thread Martin Clifford

This may sound like a stupid question, but... within a regular expression, are the 
values in brackets evaluated consecutively, or no?  For example:

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?

Elementry, my dear newbie.  Hehe.  Thanks all!

Martin


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php