I am trying to scrape Reddit posts of subreddits where a lot of questions are in the form:
s1 = "I [22M] and my partner (21F) are foo and bar"
s2 = "My (22m) and my partner (21m) are bar and foo"
I want to make a function that can parse each string and then return age and gender pairs. So:
def parse(s1):
....
return [(22, "male"), (21, "female")]
Essentially, each age/gender tag is a two-digit number followed by either f, F, m, M.