I have this regex have (?=(an|the) agreement) to find "have an/the agreement", but I want to capture "have agreement" as well. How can I achieve it?
>Solution :
You may make the middle portion of the regular expression optional
\bhave(?: (?:an|the))? agreement\b