regular expression for anything but an empty string

前端 未结 9 1007
予麋鹿
予麋鹿 2020-11-29 01:22

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 = \"          


        
9条回答
  •  迷失自我
    2020-11-29 01:48

    Assertions are not necessary for this. \S should work by itself as it matches any non-whitespace.

提交回复
热议问题