Answers for "checking empty line regex"

1

remove empty lines regex

Find: ^(?:[t ]*(?:r?n|r))+
Replace: ""
Posted by: Guest on April-29-2020
0

regex empty string

const REGEXP = /^$/;

const validate = (text) => {     
    return REGEXP.test(text);
}

const isEmpty = validate("");
const isNotEmpty = validate("x");

console.log(isEmpty); //true
console.log(isNotEmpty); //false
Posted by: Guest on May-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language