Saturday 28 December 2019

What does the regex S mean in JavaScript?

Answer



What does /\S/ mean in a regex?



while (cur ! = null) {
if (cur.nodeType == 3 && ! /\S/. test(cur.nodeValue)) {

element. removeChild(cur);
} else if (cur. nodeType == 1) {
cleanWhitespace(cur);
}
}

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...