I know this is not MC per se, but I'm going crazy. Could someone please tell me why this matches "my page" for %1 and nothing for %2?
\[\[\[\?LINK(?:\|(.*?))+\]\]\]
The text is [[[?LINK|poromenos.org|my page]]]
You have only one capturing sequence there. Round brackets capture, of which you have two sets, however (:? something) says not to capture. You have that in front of one of them.
That's not the problem, I want to capture the internal one. It always returns the last one, no matter how many I have, and even this won't work:
LINK(\|.+?)+\]
No, Somegirl, it has to be able to match any number of parameters. After talking to some Perl experts, I have found out that this can't be done, because it will always return the last match. I have finally found something regex can't do! :P
Right! This is very similar to what I was trying to do in the other thread. Matching multiple things in the same line. You can only capture the last or first thing because it will only match once per line. What Nick did works because it basically captures the whole string then the %2 is a submatch on one thing inside the string. I've just settled on sending the whole line to scripting to get what I want.
Now a lot more of the crazy RegExp documentation included with Mushclient makes sense.