I think it would make sense to pre-compile and re-use these patterns.