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:

1 Like

@martindilling it worked - Thank You!

1 Like