I would say that the regular expression given by EmFi is good enough. With some changes, it can accept expressions like
"currentDate>=2012/11/07&¤tDate<=2012/11/08";
or
"currentDate==2012/11/07";
With this modified regular expression
(<[=>]?|==|>=?|\&\&|\|\|)
And give it as "valid." Probably very simple, but at least in my case itβs enough
EDIT: Regex has been modified to take comparison operators (<,>,> =, <=, ==) and Boolean operators (& &, ||) similarly to C-like languages
source share