RegEx Not Working

I am trying use regex to get text between two string but it’s not working.

Example: "How much water does fish tank have today?"
I want to get fish tank in result

I am using current regex (?<=does ()(.?P)(?=\have))

any help would be appreciated!

1 Like

How about this: (?:does (?P<what>.+) have) :wink:

https://regex101.com/r/nN4qG7/2

1 Like

@martindilling it worked - Thank You!

1 Like