Added a function to handle pattern checking, not used yet
Normalized patterns to be more consistent

The issue here was that I had some special handling rules for identifiers and I just
felt they were too confusing.  For most cases, where we want an exact match, these
semantics work very nicely.  If we treated all patterns as regexps then an
exact match would require us to quote the pattern and put ^ and $ around it.  This way,
we assume an exact match unless the string has /'s around it (the convention for
regexps in Javascript).  Of course, in that case, if we want to exactly match
mutually exclusive patterns, we do need to wrap the expression in ^...$.  But only for
those cases, not for most cases.