I have a textarea. I would count lines of my input.
My simple countLines function works with all other regex, but not in this case.
function countLines(str){
return (str.split("\r\n|\r|\n").length -1);
}
alert( countLines($("#myTextArea").html() );
Why its return is 0 even if I have multiple lines of text?