Fixes #3788: prevent parameters from being mixed up with rules in variable replacement for directives
Merge pull request #285 from ncharles/bug_3788/dev/correct_regexp_for_rule

Bug 3788/dev/correct regexp for rule