Added carets for regex

Added carets for regex, and state declarations for clarity. The role didn't work for me without adding the carets.