I'm just trying to look for all lines that have this number format: "###-##-####" kind of like a social security number. An example:
"987-65-4321, Hadfield, Chris" is one line in the file, all lines should follow this similar format. I want to validate that the format is correct.
I'm having problems as I'm not experienced with regex. I've tried patterns that I believed would work but wouldn't
Currently I'm at grep "^[0-9]{3}\-[0-9]{2}\-[0-9]{4}"
which actually won't return any results. So it's NOT working for me.
Also I'm not sure why but even when I try to use "\d"
even by itself, it will only return strings containing a literal "d" and not a digit.