make build_regexp_for() usable for other attribute_names than "matches"

make build_regexp_for() useable for other attribute names by removing hard coded attribute_name 'matches'