Add pattern handling.
Merge pull request #1 from adam-vessey/7.x

Add extendable pattern handling.