added template support for special regex characters [], () and **