Added carets for regex

Added carets for regex, and state declarations for clarity. The role didn't work for me without adding the carets.
Merge pull request #1 from waltermj/master

Added carets for regex. Awesome, looks good to me!