I know that there are some similar questions that already have been answered, but from what I understood, they were too specific, in order to be of any use for my problem. I also thought this might be interesting to anybody facing a similar problem in the future since a possible solution to this problem will most probably not be able to rely on any special characters, but solely on alpha-numeric characters.
Link to the regex on regex101
If the link doesn't work, here's what I want to do:
I want to extract
Hello I want this to be matched World
from this string:
blablabla Hello blablablabla blablabla Hello blablabla blablabla blablabla Hello I want this to be matched World blablabla blablablablablablablablablablablabla
in the shortest possible fashion. The problem here is that my regex will match from the very first occurence of Hello, which results in
Hello blablablabla blablabla Hello blablabla blablabla blablabla Hello I want this to be matched World
My problem is I don't know how many Hellos might occur between the first Hello and the Hello right before I want this... Does anybody know an elegant solution for this problem? Thanks in advance!