This is because {} are special characters, and they must be handled differently in order to have this special behavior. Otherwise, they will be treated as the letter { and } .
You can either escape like you:
$ echo "@NS500287" | grep '^@NS500[0-9]\{3\}' @NS500287
or use grep -E :
$ echo "@NS500287" | grep -E '^@NS500[0-9]{3}' @NS500287
Without processing:
$ echo "he{llo" | grep "{" he{llo
From man grep :
-E , --extended-regexp
Interpret PATTERN as an extended regular expression (ERE, see below). (-E is specified by POSIX.)
...
REGULAR EXPRESSIONS
A regular expression is a pattern that describes a set of strings. Regular expressions are constructed similarly to expression arithmetic, using different operators to combine smaller expressions.
grep understands three different versions of the regular expression syntax: "main", "advanced" and "perl". In GNU grep, there is no difference in the available functions between the main and advanced syntaxes. In other implementations, basic regular expressions are less powerful. The following description applies to extended regular expressions; The differences for the main regular expressions are summarized after that. Perl regular expressions provide additional functionality, and are documented in pcresyntax (3) and pcrepattern (3), but may not be available on every system.
...
Basic and extended regular expressions
In basic regular expressions, the metacharacters ?, +, {, |, (, and) lose their special meaning; use inverse \? characters instead , \+ , \{ , \| , \( and \) .