I have a text file, which contains a date in the form of dd/mm/yyyy (e.g 20/12/2012).
I am trying to use grep to parse the date and show it in the terminal, and it is successful, until I meet a certain case:
These are my test cases:
grep -E "\d*"returns 20/12/2012grep -E "\d*/"returns 20/12/2012grep -E "\d*/\d*"returns 20/12/2012grep -E "\d*/\d*/"returns nothinggrep -E "\d+"also returns nothing
Could someone explain to me why I get this unexpected behavior?
EDIT: I get the same behavior if I substitute the " (weak quotes) for ' (strong quotes).