rename regex attribute "data" to "matches"
check if keys exists