Fix format validation regex

Rails 4 complains that the name format validation regex matches line beginning and end instead of string beginning and end and is right in doing so. So I fixed it.

Regards,
CQQL