Got another one for you here! I've been fiddling for a while but I'm getting lost. I think the maybe the key to acheiving this is in combining conditionals with positive lookaheads?
I want to always find the start of a string. I've called it "MatchMe!"
in the example but in reality it can be anything. Part 1
, Part 2
, Part 3
and Part 4
are always the same (well not the same but I can regex these reliably)
Is there a way to try and do a positive lookahead with Part 1
, if that doesn't exist, try a positive lookahead with Part 2
, and if that doesn't exist try a positive lookahead with Part 3
, and lastly try the same with Part 4
? Or am I overcomplicating things
My lousy attempt is here but it gives an idea of my problem :-)
https://regex101.com/r/TvgXXB/1
Many thanks again!