View Single Post
Old Mar 27th, 2008, 1:06 PM   #1
Arla
Hobbyist Programmer
 
Join Date: Mar 2005
Posts: 142
Rep Power: 4 Arla is on a distinguished road
Regex, or I'm thick

Can't for the LIFE of me figure how to do this, and it seems like it would be stupidly simple.

I want a REGEX that will tell me if a string contains anything other than whitespace.

I've tried @"\s" but that just looks for a single whitespace (so a single whitespace anywhere in the text), @"\s*" but that seems to match anything (and everything?)

Where am I going wrong? I tried @"\s*^\S" but that again seems to match anything, what the hell am I doing wrong?
Arla is offline   Reply With Quote