i am trying to detect an empty string or a string with just white spaces such as " ".
It is a c application and uses `regcomp` and `regexec`.

For empty string `"^$"` works fine.

But for string with just whitespaces i am getting a problem. So far, i have come up with 

`"[\\s]*(?![A-za-z0-9])$"`

Is there a better way to express it using perl style regular expression?

UPDATE:
i actually changed it `"[\\s]*(?![\\w\\d\\t\\n\\r]*)$"` 

The above gives an error when i give an input such as " m". The error is 

`"Invalid preceding regular expression"`