passing in a regex instead of string to regexspecification