Board Thread:Support Requests - Getting Technical/@comment-10637-20170626174632/@comment-27958705-20170629161625

If you want to hunt specific link (foo), then you need 2 rules: Opt "singleline" on. If you change "foo" to ".*?", then all duplicates will be affected.
 * 1) remove unpiped doubles (bar...foo->bar...foo): \[\[(?(foo)\|?(.*?))\]\](.*?)\[\[(\1)\]\]
 * 2) replacement rule: ${s1}$3$1
 * 3) remove piped doubles (bar...nobar->bar..nobar): \[\[(?(foo)\|?(.*?))\]\](.*?)\[\[(\1)\|?(.*?)\]\]
 * 4) replacement rule: ${s1}$3$5