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.
In reply to Re^3: Multiline match for empty string
by ikegami
in thread Multiline match for empty string
by josh803316
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |