Fix `.` in attribute name with appropriate regexp

The original implementation used the overly-permissive `.` in its regular expression, where a literal period is needed.