added regex support and global helper rather than using same code multip...