What does this
egrep command do?
egrep '[^A-M][0-9]+' /etc/passwd
So far I think it searches for any file in
/etc/passwd that starts with A-M and includes the number(s) 0-9. Is that right?
So the expression you've got matches "anything not A-M, followed by 1 or more digits".
The following lines would all match that expression:
Because they all contain a digit preceded by something that is not in the range A-M.