Add support for multiple patterns.