while (1) {
char buffer [ 100 ] = { 0 };
int check;
check = fscanf_s ( stdin, "%[^3]", buffer , 100 ); // ABC3DE
check = fscanf_s ( stdin, "%[^3]", buffer , 100 ); // ошибка чтения
}
[set]
matches a non-empty sequence of character from set of characters.
If the first character of the set is ^, then all characters not in the set are matched. If the set begins with ] or ^] then the ] character is also included into the set. It is implementation-defined whether the character - in the non-initial position in the scanset may be indicating a range, as in [0-9]. If width specifier is used, matches only up to width. Always stores a null character in addition to the characters matched (so the argument array must have room for at least width+1 characters)