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 = \"
I think [ ]{4} might work in the example where you need to detect 4 spaces. Same with the rest: [ ]{1}, [ ]{2} and [ ]{3}. If you want to detect an empty string in general, ^[ ]*$ will do.
[ ]{4}
[ ]{1}
[ ]{2}
[ ]{3}
^[ ]*$