Use the pretty value for getMatchingRule().
Optimized.
Improvements, added credits.