regex not blank and not match code example
Example: regex is not empty string
const REGEXP = /^$/;
const validate = (text) => {
return REGEXP.test(text);
}
const isNotEmpty = validate("x");
const isEmpty = validate("");
console.log(isNotEmpty); //false
console.log(isEmpty); //true