Not Xojo questions I know. But I guess it’s OK
How do you get these three results?
This is wanted.
This may be wanted.
This, on the other hand is wanted.
From this string:
This is wanted. This may be wanted. This, I don't want. This, on the other hand is wanted.
Using this search pattern:
this(.*?)wanted\.
gives me three results but the last one is not the one I want.
This is wanted.
This may be wanted.
This, I don't want. This, on the other hand is wanted.
How can I exclude matches if there’s an extra “This” somewhere in a result?