Simplify virtual element regex and use "test" instead of "match"