src/js/popup.js
/* Validate that a given pattern string is a valid regex */
Validate that a given pattern string is a valid regex
Validate that a given pattern string is a valid regex
function isValidRegex(pattern) {
  try {
    var regex = new RegExp(pattern);
    return true;
  } catch (e) {
    return false;
  }
}
function isValidRegex ( pattern ) { try { var regex = new RegExp ( pattern ) ; return true ; } catch ( e ) { return false ; } }
Validate that a given pattern string is a valid regex
Validate that a given pattern string is a valid regex