User:COBot/Sandboxes/ExternaltoInterwiki

From Wikipedia, the free encyclopedia

[edit] Regexes for HermesBot

Find Replace with
\[http://en\.wikibooks\.org/wiki/(\$*) (.*)\] [[b:$1|$2]]
\[http://en\.wikibooks\.org/wiki/(\S*)] [[b:$1]]
\[http://en\.wikiquotes\.org/wiki/(\$*) (.*)\] [[q:$1|$2]]
\[http://en\.wikinews\.org/wiki/(\$*) (.*)\] [[wikinews:$1|$2]]
\[http://en\.wikinews\.org/wiki/(\S*)] [[wikinews:$1]]
\[http://en\.wikiquotes\.org/wiki/(\S*)] [[q:$1]]
  1. find \[http://en\.wikisource\.org/wiki/(\S*) (.*)\], replace with [[s:$1|$2]]
  2. find \[http://en\.wikisource\.org/wiki/(\S*)], replace with [[s:$1]].
  3. find \[http://en\.wikiquote\.org/wiki/(\S*) (.*)\], replace with [[q:$1|$2]]
  4. find \[http://en\.wikiquote\.org/wiki/(\S*)], replace with [[q:$1]].
  5. find \[http://en\.wiktionary\.org/wiki/(\S*) (.*)\], replace with [[wiktionary:$1|$2]]
  6. find \[http://en\.wiktionary\.org/wiki/(\S*)], replace with [[wiktionary:$1]].
  7. find \[http://commons\.wikimedia\.org/wiki/(\S*) (.*)\], replace with [[commons:$1|$2]]
  8. find \[http://commons\.wikimedia\.org/wiki/(\S*)], replace with [[commons:$1]].
  9. find \[http://en\.wikinews\.org/wiki/(\S*) (.*)\], replace with [[n:$1|$2]]
  10. find \[http://en\.wikinews\.org/wiki/(\S*)], replace with [[n:$1]].
  11. find \[http://en\.wikispecies\.org/wiki/(\S*) (.*)\], replace with [[s:$1|$2]]
  12. find \[http://en\.wikispecies\.org/wiki/(\S*)], replace with [[s:$1]].