Fixed group definition in attr regexp to take the smallest possible group

Related to issue #8