I'm using python regex on these two strings:
t1 = 'foo 36 months bar'
t2 = 'bar Not suitable for children under 36 months foo'
I want to match '36 months' on t1, and not match t2 because it has 'Not suitable for children under' before the '36 months.
After searching I have this:
regex = re.compile(r'((?!Not suitable for children under) 36 month)')
But it matches both. How do adapt this so it doesn't match a string with 'Not suitable for children under' before the ' 36 months'?
many thanks