I have the following regular expression:
([:digit:]{4})-([:digit:]{1,2})-([:digit:]{1,2})
It should get dates in this format:
2010-12-19
And I am using it on filenames that look like this:
2010-12-19-xxx-xxx-xxx.markdown
And, when I use it with grep like this:
echo $POST | grep -oE "([:digit:]{4})-([:digit:]{1,2})-([:digit:]{1,2})" # $POST is the filename
It doesn't work, I just get emptiness.