2 Regex question
How can I match a word or 2 words in a subpattern ()?
How can i match a word or 2 words that’s either followed by a specific word like “with” OR the end of the string $
I tried
(\w+\W*\w*\b)(\W*\bwith\b|$)
but it’s definitely not working
edit:
I’m thinking of matching both “go to mall” and “go to”, in a way that i can group “go to” in python.
Perhaps something like this?