Aww egg moves! Try this regex:
(?:.*Parents?:|\G)[\s,]*\K\[\[([^\]]+)\]\],?
Replace by:
{{mpic|$1}}
That should do it :)
(?:
.*Parents?: # begins with ".*Parents?:"
| # or
\G # at the end of previous match
)
[\s,]* # match spaces and commas
\K # restart the match
\[\[ # match twin open square brackets
([^\]]+) # capture what's inside the square brackets
\]\] # match twin close square brackets
,? # match any comma that comes after it
I think that \G
was implemented in v6x versions. Try this workaround:
\[\[([^\]]+)\]\](?![^:\n]*:),?
And replace with the same thing as before. That one is a little simpler though I guess works just as well. It matches [[ ... ]]
as long as it doesn't have a :
somewhere ahead on the same line.