Linked Questions

Popular Questions

So I have a string say "Explain STARThow you STARTencountered the problem you’reSTART trying to solveEND, and anySTART difficulties that STARThave prevented you fromEND solving it yourself."

I have this pattern: @"START.*?END";

But when I evaluate and match this I am getting: "STARThow you STARTencountered the problem you’reSTART trying to solveEND" and "START difficulties that STARThave prevented you fromEND"

What I need is to get the occurrence where the START word is closest to the END word: "START trying to solveEND" and "STARThave prevented you fromEND"

Related Questions