gaz Heyes :

> You could shorten that to:
> /^[a-z_$][\w$]*$/i
>
> Much cleaner :P

You are correct it's shorter, but personally I prefer previous variant
of that RegExp. I think it's more verbose than `\w`. Also when I use
`i` modifier I always use upper case letters in RegExp literal because
they are easier for reading.

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to