Strange behaviour of REGEX in a WordPress filter (trying to suppress emtpy paragraphs)

In your first example, your regex is \s, which will match a whitespace character. In the second example, you have \s*, which will match zero or more whitespace characters. You’re probably looking for \s+, one or more whitespace characters.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)