Hi Have table in oracle like
ID NAME STARTDATE
1 A 2014-01-01
2 B 1900-01-01
3 C 29-02-2016
Here while executing select query I want to put data validation which check year between 1900-2099 month 1-12 and date between 1-31. I try to get this result by using regular expression in my query
SELECT *
FROM test
WHERE REGEXP_LIKE (
startdate,
'^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$')
it's working fine but with the case 31-02-2016 its failing, I tried to use another expression which given in this link Regex to validate date format dd/mm/yyyy
but it's showing no data found while executing the query, Is there any limit of oracle with regular expression as the same expression working fine on this http://regexr.com/