## 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
try:
        cached_result = cache.get(cache_key)  
        return cached_result
    except:  
        try:
            cache.delete(cache_key)  
        except:
            pass
    return None
ANONYMOUS_REGEX = r"^([a-z0-9]+\-){4}([a-z0-9]+)$"
def is_anonymous_id(distinct_id: str) -> bool:
    
    return bool(re.match(ANONYMOUS_REGEX, distinct_id))
def mask_email_address(email_address: str) -> str:
    """
    Grabs an email address and returns it masked in a human-friendly way to protect PII.
        Example: testemail@posthog.com -> t********l@posthog.com
    """
    index = email_address.find("@")
    if index == -1:
        raise ValueError("Please provide a valid email address.")
    if index == 1:
        
        return f"*{email_address[index:]}"
    return f"{email_address[0]}{'*' * (index - 2)}{email_address[index-1:]}"