Tag Archives: regex

Dynamically Escape Regular Expressions In JavaScript

I’m not sure why, but JavaScript doesn’t appear to have a good way of escaping regular expressions that are provided dynamically. In my case, I was using a string provided as part of a JSON AJAX response, and I realized … Continue reading

Posted in JavaScript | Tagged , , | Leave a comment