RegExp ignore & templates array

- allow `templates` variable to be an array
- use RegExp in `ignoreList` for better matching