http://www.regular-expressions.info/dot.html
The dot matches a single character, without caring what that character is. The only exception are newline characters. In all regex flavors discussed in this tutorial, the dot will not match a newline character by default. So by default, the dot is short for the negated character class [^\n] (UNIX regex flavors) or [^\r\n] (Windows regex flavors).

codice:
        var str = "ciao\n";
        var re = /([b])(.|\s)*(<\/b>)/gim
        if (re.test(str)) {
            alert('matcha');
        }