Ok, makes sense. But then your earlier comment
[^] is not a negated empty set, just as [] is not an empty set. They are sets which contain (or does not contain, in the case of ^) the character "]".
seems incorrect. If
sscanf("^^^^^^^^hello", "%*[^]%s", string res) && res;
throws an "Error in sscanf string" it's obviously not equivalent to [^]]. Also, shouldn't you get the same error from
sscanf("^^^^^^^^hello", "%*[]%s", string res) && res;
since it's an unbalanced pattern string lacking a closing bracket?