in reply to pcre grep
I think, you could have a look at the official perldoc to get information about Perl's regular expressions:
perlretut - Tutorial
perlrequick - Quick Reference
perlre - Regex documentation
And not to forget the pcre man pages:
If you want/have to stick to pcregrep, I suggest something like:
pcregrep -v "^[^:]*:[^:]*:-?(1?\d?\d|20[0-4]):" /etc/passwd
It (simplified) assumes/uses:
|
|---|