error handling.
add support for Perl regexp \U, \L, \E
handle invalid formulas.
don't trim spaces in test string. (ng-trim from angularjs >= 1.1.1)