## Bug description

The following filter fails with a 500 internal error.

![2021-02-04_12-07](https://user-images.githubusercontent.com/148820/106877644-a9f4ce80-66e1-11eb-8320-87bb213bdde2.png)


## Expected behavior

Error is shown to user about invalid regular expression.

Note no errors shown on the page as well.

## How to reproduce

1. Go to events
2. Add filter "Current URL matches regular expression ?*"
3. See infinite loading screen / error

## Environment

- [x] PostHog Cloud
- [x] self-hosted PostHog, version/commit: _please provide_

## Additional context

Note this can also happen when filtering by events.

#### *Thank you* for your bug report – we love squashing them!

posthog/utils.py
date = date - relativedelta(day=1)
        if match.group("position") == "End":
            date = date - relativedelta(day=31)
    elif match.group("type") == "y":
        if match.group("number"):
            date = date - relativedelta(years=int(match.group("number")))
        if match.group("position") == "Start":
            date = date - relativedelta(month=1, day=1)
        if match.group("position") == "End":
            date = date - relativedelta(month=12, day=31)
    return date.replace(hour=0, minute=0, second=0, microsecond=0)
def request_to_date_query(filters: Dict[str, Any], exact: Optional[bool]) -> Dict[str, datetime.datetime]:
    if filters.get("date_from"):
        date_from: Optional[datetime.datetime] = relative_date_parse(filters["date_from"])
        if filters["date_from"] == "all":
            date_from = None
    else:
        date_from = datetime.datetime.today() - relativedelta(days=7)
        date_from = date_from.replace(hour=0, minute=0, second=0, microsecond=0)
    date_to = None
    if filters.get("date_to"):
        date_to = relative_date_parse(filters["date_to"])
    resp = {}
    if date_from:
        resp["timestamp__gte"] = date_from.replace(tzinfo=pytz.UTC)
    if date_to:
        days = 1 if not exact else 0
        resp["timestamp__lte"] = (date_to + relativedelta(days=days)).replace(tzinfo=pytz.UTC)
    return resp
def get_git_branch() -> Optional[str]: