Is it possible to use a regular expression to detect anything that is NOT an \"empty string\" like this:
string s1 = \"\"; string s2 = \" \"; string s3 = \"
What about?
/.*\S.*/
This means
/ = delimiter .* = zero or more of anything but newline \S = anything except a whitespace (newline, tab, space)
/
.*
\S
so you get match anything but newline + something not whitespace + anything but newline