I'm not familiar with R or its naming conventions, but I'll give it a shot:
If you're only trying to verify that the name begins correctly, all you need to do is remove the \.
from the character class, leaving you with: /^\.(?!\d)|^[a-z]/i
. Otherwise, the .
may still be the first character with no restrictions on the remaining ones.
If you want to verify the that entire name is correct, something like this should work:
/^(?:\.(?!\d)|[a-z])[a-z0-9_\.]+$/i
Bryan
2010-07-25 21:46:54