Wikipedia talk:AutoWikiBrowser/Settings/Bracket reference conversion
Latest comment: 17 years ago by Gaius Cornelius in topic Alternative search and replace
Alternative search and replace
editI have had more success with the following search string:
"(?<!(<ref.*>|\*\s*))\[(https?://[^\] ]*)\](?!.*</ref>)"
This will find all inline URLs "\[(https?://[^\] ]*)\]" that are not already inside a footnote reference or immediately following an asterisk. This avoids many false positives.
I then use a replace string as follows:
"<ref>$2</ref>"