I'm trying to get a regular expression to match something inbetween two strings that includes a third. I'm having trouble getting the lazy quantifier to cooperate, as there are multiple instances of these strings in the input and the RegEx matches something that is not useful, i.e.:
Start...End...Start...End...Start...Middle...End
Whet I'm actually looking for (only one instance of Start and End for each match):
Start...Middle...End
or Start...Center...End
I'm pretty sure I need to use lookahead/lookbehind, but while I do conceptually understand them, putting them into practice is really difficult. Here's where I'm at:
/<Start[\s\S]*?(Middle|Center)[\s\S]*?End>/gm