remove alert from javascript
make patterns case insensitive