What is need is given the following string "Other Text [[MyText]] Some Other Text", and given some specific characters like "[[" for start and "]]" for end, to be able to match "[[MyText]]".
Given the following regex = "(\[\[)(.*)(\]\])"
I am able to match what I want, but not exactly.
Lets say I have this string "Other Text[[ Something...[[MyText]]......something...[[MyOtherText]]" - I need to have 2 matches here "[[MyText]]" && "[[MyOtherText]]". My regex is too eager and matches more than I really want to.
Please, besides the answer I am looking to understand how it works, so a few comments as well will be helpful. Thanks.