I am trying to match some strings using regex. What I want to search is any string that talks about someone's children. Like for example: my son, my daughter, our daughters, etc
So I have written this in Python:
re.match(r'\b(my|our)\b \b(son|daughter|children|child|kid)s?', 'me and my son were')
But some how it doesn't match the my son
in the test sentence. Returns None
I have tested this regex here: https://regex101.com/r/ChAy9e/1 and it works fine (5th line in test cases).
I'm not able to figure out what I'm doing wrong.
Thanks!