New answers tagged

2

One can use here regular expression with Negative Lookahead (?!regex) Before the Match in the same way as shown in this answer: StringCases["blabla ...Hello Hello ... blabla ... Goodbye Goodbye ..", "Hello" ~~ RegularExpression["(?:(?!Hello).)*?"] ~~ "Goodbye"] {"Hello ... blabla ... Goodbye"} StringCases["blabla ...Hello Hello ... blabla ... ...



Top 50 recent answers are included