i'm using this function to count empty lines inside a string.
function count_empty_lines(text){
return text ? (text.match(/^[ \t]*$/gm) || []).length : 0;
}
I'm trying to edit that regex in order to implement a function that counts non empty lines.
function count_non_empty_lines(text){
}
Any ideas? Thanks!