## Bug description

Deprecation warning due to invalid escape sequences in Python 3.8 . 

```
posthog/models/team.py:47:46: W605 invalid escape sequence '\w'
posthog/models/filters/test/test_filter.py:131:74: W605 invalid escape sequence '\.'
posthog/models/filters/test/test_filter.py:135:78: W605 invalid escape sequence '\.'
posthog/migrations/0132_team_test_account_filters.py:51:46: W605 invalid escape sequence '\w'
ee/clickhouse/views/element.py:47:48: W605 invalid escape sequence '\.'
ee/clickhouse/views/element.py:50:69: W605 invalid escape sequence '\.'
```

This is little more important since Python emits deprecation warning during compile time for these

## Expected behavior

This can be fixed with pyupgrade : https://github.com/asottile/pyupgrade#invalid-escape-sequences . Appropriate rule can be added to flake8 so that this caught.

## How to reproduce


```
find posthog -iname '*py' | xargs -P4 -I{} python3.8 -Wall -m py_compile {}     
posthog/models/team.py:47: DeprecationWarning: invalid escape sequence \w
  example_email = re.search("@[\w.]+", example_emails[0])
posthog/models/filters/test/test_filter.py:131: DeprecationWarning: invalid escape sequence \.
  filter = Filter(data={"properties": {"$current_url__regex": "\.com$"}})
posthog/models/filters/test/test_filter.py:135: DeprecationWarning: invalid escape sequence \.
  filter = Filter(data={"properties": {"$current_url__not_regex": "\.eee$"}})
posthog/migrations/0132_team_test_account_filters.py:51: DeprecationWarning: invalid escape sequence \w
  example_email = re.search("@[\w.]+", example_emails[0])
```

## Environment

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

## Additional context



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

posthog/models/filters/test/test_filter.py
person1_distinct_id = "person1"
        person1 = Person.objects.create(
            team=self.team, distinct_ids=[person1_distinct_id], properties={"$some_prop": 1}
        )
        cohort1 = Cohort.objects.create(team=self.team, groups=[{"properties": {"$some_prop": 1}}], name="cohort1")
        cohort1.people.add(person1)
        filter = Filter(data={"properties": [{"key": "id", "value": cohort1.pk, "type": "cohort"}],})
        matched_person = (
            Person.objects.filter(team_id=self.team.pk, persondistinctid__distinct_id=person1_distinct_id)
            .filter(properties_to_Q(filter.properties, team_id=self.team.pk, is_person_query=True))
            .exists()
        )
        self.assertTrue(matched_person)
class TestDateFilterQ(BaseTest):
    def test_filter_by_all(self):
        filter = Filter(
            data={
                "properties": [
                    {
                        "key": "name",
                        "value": json.dumps({"first_name": "Mary", "last_name": "Smith"}),
                        "type": "person",
                    }
                ],
                "date_from": "all",
            }
        )
        date_filter_query = filter.date_filter_Q
        self.assertEqual(date_filter_query, Q())
    def test_default_filter_by_date_from(self):