import pandas as pd
pd.options.display.max_colwidth = 100
import re
df = pd.read_csv("regex02.csv")
df.shape
(9, 2)
pattern = r"e[\-\s]?mail"
df[df.title.str.contains(pattern,flags=re.I)].head(45)
id | title | |
---|---|---|
0 | 0 | Ask HN: Building an email killer |
1 | 1 | The fine art of literary hate mail endures |
2 | 2 | The extensible open source mail client |
3 | 3 | Ask HN: How does email tracking work? |
4 | 4 | Ask HN: Why do dev communities still use mailing lists? |
5 | 5 | Donald Trump's voicemails hacked by Anonymou |
6 | 6 | How do I find out who has sent me the most e-mails? |
7 | 7 | Out of office Email handling |
8 | 8 | You should check E-mail on a schedule |
pattern = r"\be[\-\s]?mails?\b"
df[df.title.str.contains(pattern,flags=re.I)].head(45)
id | title | |
---|---|---|
0 | 0 | Ask HN: Building an email killer |
3 | 3 | Ask HN: How does email tracking work? |
6 | 6 | How do I find out who has sent me the most e-mails? |
7 | 7 | Out of office Email handling |
8 | 8 | You should check E-mail on a schedule |