Remember to always anchor the expression at the end of the line for it to work properly. However, simply doing that won't fix everything. Your current expression is incorrect. I believe it should look like this:
/^None_[0-9]+$/
^
indicates the start of a line
[0-9]+
matches any sequence of one or more digits
None_
specifically matches the characters None_
$
denotes the end of a line
If you want to match only one digit, then you should exclude the +
.
Your initial expression /^None_+[0-9]{?}/
functioned in the following way:
^
matched the beginning of a line
None
specifically matched None
_+
matched one or more underscores
[0-9]
matched a single digit
{?
attempted to match an optional opening bracket {
}
matched }