be less restrictive when applying regular expressions

* static/js/index.js: accept dates which do not start directly at the
  beginning of the input string