in reply to Re^2: Multiline match for empty string
in thread Multiline match for empty string

I forgot to anchor. Should be

"\\A(?!.*[^\n])" or "\\A(?!.*\\S)"

Of course, the following are much simpler:

"\\A[^\n]*\\z" or "\\A\\s*\\z"

By the way, your test is wrong. You never actually attempt to match.