User:AugPi/RegexMagic

ˈɹɛdʒˌɛks ˈmædʒɪk

1
http://en.wiktionary.org/w/index.php?title=User:AugPi/la-conj-4th&diff=9876590&oldid=9876578 http://en.wiktionary.org/w/index.php?title=User:AugPi/la-conj-1st-nopass&diff=next&oldid=9880802 /\{\{#if: \{\{\{(\d)\1\|\}\}\}\|\[\[\{\{\{\1\1\}\}\}([\w]+)\{\{!\}\}\{\{\{\1\}\}\}([\wāēīōū]+)\]\]\|\[\[\{\{\{\1\}\}\}\2\{\{!\}\}\{\{\{\1\}\}\}\3\]\]\}\}/g ⇒ XX=$2♡
 * XXmac=$3

2
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-part-3rd/DISTRIB&diff=prev&oldid=9880125

/title=(\{\{User:QuasiBot\/\{\{User:QuasiBot\/verb\}\}/[\d]{2}\}\}[\w]+)&action=edit&autoedit=s%7B%7Bsubst:User:QuasiBot\/part\/auto\|\{\{User:QuasiBot\/verb\}\}%7D%7D~g&autoclick=wpSave&autominor=true&autosummary=substing%20%7B%7BUser:QuasiBot\/part\/auto\|\{\{User:QuasiBot\/verb\}\}%7D%7D/g ⇒ title=$1&action=edit&autoedit=s%7B%7Bsubst:User:QuasiBot/part/auto|%7D%7D~g&autoclick=wpSave&autominor=true&autosummary=substing%20%7B%7BUser:QuasiBot/part/auto|%7D%7D%20

3
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-conj-1st-nopass/DISTRIB&diff=9882318&oldid=9882307 /\&\&\{\{User:QuasiBot\/\{\{User:QuasiBot\/verb\}\}\/(\d)\1\}\}([\w]+)\^\^/g ⇒ $2 CREATE

4
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-decl-3rd-part&diff=9887864&oldid=9887846 /\[\[([\{\d\}\|\wāēīōū]+)\]\]/g ⇒ $1 CREATE

5
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-conj-2nd%2Bgloss&diff=9897797&oldid=9897766

/lang=la\}\}\{\{conjugation of\{\{subst:!\}\}\{\{subst:User:QuasiBot\/\{\{\{1\}\}\}\/11\}\}eo\{\{subst:!\}\}\{\{subst:User:QuasiBot\/\{\{\{1\}\}\}\/1\}\}eō/g ⇒ lang=la}}{{conjugation of{{subst:!}}{{subst:User:QuasiBot/{{{1}}}/11}}eo

6
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-conj-4th%2Bgloss&diff=9901484&oldid=9901471 /lang=la\}\}\{\{conjugation of\{\{subst:!\}\}\{\{subst:User:QuasiBot\/\{\{\{1\}\}\}\/11\}\}io\{\{subst:!\}\}\{\{subst:User:QuasiBot\/\{\{\{1\}\}\}\/1\}\}iō/g ⇒ lang=la}}{{conjugation of{{subst:!}}{{subst:User:QuasiBot/{{{1}}}/11}}io

7
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-conj-2nd-nopass/DISTRIB&diff=9914360&oldid=9914348

/\&\&\{\{User:QuasiBot\/\{\{User:QuasiBot\/verb\}\}\/(\d)\1\}\}([\w]+)\^\^/g ⇒ $2 CREATE

Note: The above regex formula is obsolete. Now use: /\&\&\{\{User:QuasiBot\/\{\{User:QuasiBot\/verb\}\}\/(\d)\1\}\}([\w]+)\^\^/g ⇒

8
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-conj-1st/DISTRIB&diff=9938203&oldid=9926540 /\[\[\{\{User:QuasiBot\/\{\{User:QuasiBot\/verb\}\}\/(\d)\1\}\}([\w]+)\]\] \[http:\/\/en.wiktionary.org\/w\/index.php\?title=\{\{User:QuasiBot\/\{\{User:QuasiBot\/verb\}\}\/\1\1\}\}\2&action=edit&autoedit=s%7B%7Bsubst:User:QuasiBot\/auto%7C\{\{User:QuasiBot\/verb\}\}\{\{#ifeq:\{\{User:QuasiBot\/verb-mac\}\}\|0\|\|%7C\{\{User:QuasiBot\/verb-mac\}\}\}\}%7D%7D~g&autoclick=wpSave&autominor=true&autosummary=substing%20%7B%7BUser:QuasiBot\/auto%7C\{\{User:QuasiBot\/verb\}\}\{\{#ifeq:\{\{User:QuasiBot\/verb-mac\}\}\|0\|\|%7C\{\{User:QuasiBot\/verb-mac\}\}\}\}%7D%7D CREATE\]/g ⇒

9
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-conj-1st/DISTRIB&diff=9938760&oldid=9938203 /\[\[\{\{User:QuasiBot\/\{\{User:QuasiBot\/verb\}\}\/(\d)\1\}\}([\w]+)\]\] \[http:\/\/en.wiktionary.org\/w\/index.php\?title=\{\{User:QuasiBot\/\{\{User:QuasiBot\/verb\}\}\/\1\1\}\}\2&action=edit&autoedit=s%7B%7Bsubst:User:QuasiBot\/auto%7C\{\{User:QuasiBot\/verb\}\}\{\{#ifeq:\{\{User:QuasiBot\/verb-mac\}\}\|0\|\|%7C\{\{User:QuasiBot\/verb-mac\}\}\}\}%7Cp=1%7D%7D~g&autoclick=wpSave&autominor=false&autosummary=substing%20%7B%7BUser:QuasiBot\/auto%7C\{\{User:QuasiBot\/verb\}\}\{\{#ifeq:\{\{User:QuasiBot\/verb-mac\}\}\|0\|\|%7C\{\{User:QuasiBot\/verb-mac\}\}\}\}%7Cp=1%7D%7D CREATE\]/g ⇒

10
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-decl-1%262&diff=9975871&oldid=9926598 /\[\[\{\{\{1\}\}\}([\w]+)\]\] \[http:\/\/en.wiktionary.org\/w\/index.php\?title=\{\{\{1\}\}\}\1&action=edit&autoedit=s\%7B\%7Bsubst:User:QuasiBot\/part\/auto\%7C\{\{User:QuasiBot\/verb\}\}\%7D\%7D~g&autoclick=wpSave&autominor=true&autosummary=substing\%20\%7B\%7BUser:QuasiBot\/part\/auto\%7C\{\{User:QuasiBot\/verb\}\}\%7D\%7D CREATE\]/g ⇒

11
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-decl-3rd-part&diff=9982249&oldid=9926600 /\[\[\{\{\{3\|\{\{\{1\}\}\}\}\}\}([\w]+)\]\] \[http:\/\/en.wiktionary.org\/w\/index.php\?title=\{\{\{3\|\{\{\{1\}\}\}\}\}\}\1&action=edit&autoedit=s\%7B\%7Bsubst:User:QuasiBot\/part\/auto\%7C\{\{User:QuasiBot\/verb\}\}\%7D\%7D~g&autoclick=wpSave&autominor=true&autosummary=substing\%20\%7B\%7BUser:QuasiBot\/part\/auto\%7C\{\{User:QuasiBot\/verb\}\}\%7D\%7D CREATE\]/g ⇒

12
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-decl-3rd-part&diff=9982307&oldid=9982249 /\[\[\{\{\{1\}\}\}([\w]*)\]\] \[http:\/\/en.wiktionary.org\/w\/index.php\?title=\{\{\{1\}\}\}\1&action=edit&autoedit=s\%7B\%7Bsubst:User:QuasiBot\/part\/auto\%7C\{\{User:QuasiBot\/verb\}\}\%7D\%7D~g&autoclick=wpSave&autominor=true&autosummary=substing\%20\%7B\%7BUser:QuasiBot\/part\/auto\%7C\{\{User:QuasiBot\/verb\}\}\%7D\%7D CREATE\]/g ⇒

13
http://en.wiktionary.org/w/index.php?title=User:AugPi/la-conj-base-depon&diff=10023207&oldid=10023162 Note: copy this from the edit window, not from the rendered page. /\*([\d]+)\*/g ⇒

14
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-conj-1st%2Bgloss&diff=11046161&oldid=11046131 /\{\{term\{\{subst:!\}\}\{\{\{lemma\|\{\{\{1\}\}\}\}\}\}\{\{subst:!\}\}\{\{subst:#if:\{\{\{2\|\}\}\}\|\{\{\{2\}\}\}\|\{\{subst:User:QuasiBot\/la-verb\|\{\{\{1\}\}\}\|1\}\}ō\}\}/g ⇒ {{term{{subst:!}}{{subst:User:QuasiBot/la-verb|{{{1}}}|lemma}}{{subst:!}}{{subst:User:QuasiBot/la-verb|{{{1}}}|mac}}

15
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-conj-2nd-nopass%2Bgloss&diff=11057867&oldid=11057819 /\{\{term\{\{subst:!\}\}\{\{\{lemma\|\{\{\{1\}\}\}\}\}\}\{\{subst:!\}\}\{\{subst:#if:\{\{\{2\|\}\}\}\|\{\{\{2\}\}\}\|\{\{subst:User:QuasiBot\/la-verb\|\{\{\{1\}\}\}\|1\}\}eō\}\}/g ⇒ {{term{{subst:!}}{{subst:User:QuasiBot/la-verb|{{{1}}}|lemma}}{{subst:!}}{{subst:User:QuasiBot/la-verb|{{{1}}}|mac}}

16
http://en.wiktionary.org/w/index.php?title=User:QuasiBot/la-conj-4th%2Bgloss&diff=11060181&oldid=11060177 /\{\{term\{\{subst:!\}\}\{\{\{lemma\|\{\{\{1\}\}\}\}\}\}\{\{subst:!\}\}\{\{subst:#if:\{\{\{2\|\}\}\}\|\{\{\{2\}\}\}\|\{\{subst:User:QuasiBot\/la-verb\|\{\{\{1\}\}\}\|1\}\}iō\}\}/g ⇒ {{term{{subst:!}}{{subst:User:QuasiBot/la-verb|{{{1}}}|lemma}}{{subst:!}}{{subst:User:QuasiBot/la-verb|{{{1}}}|mac}}

17
http://en.wiktionary.org/w/index.php?title=User:AugPi/Sandbox2&diff=11118499&oldid=11118482 /([\w\u011D\u0109\u015D\u0125\u0135\u016D]+)/ig ⇒

18
(Sandbox2 — October 6, 2012)

/\s+[\w_]+_(\d+)\s\s(s|r)[hifteduce]+\s(\d+)/g ⇒ action(99,$1,$2($3)).♡

/\s+(\$end|error)\s\s(r|s)[hifteduce]+\s(\d+)/g ⇒ action(99,'$1',$2($3)).♡

/\$end/g ⇒ $

/.a/g ⇒ .♡a

Comments

 * Used to convert a "row of the action table" in the y.output file produced by Berkeley YACC when given the Lojban YACC grammar as input.
 * Replace the 99 with the given state number.
 * Replace the white heart with a newline/CR.

19
/\s+[\w_]+_(\d+)\s\sgoto\s(\d+)/g ⇒ goto(99,$1,$2).♡

Comments

 * Used to convert a "row of the goto table" in the y.output file produced by Berkeley YACC when given the Lojban YACC grammar as input.
 * Replace the 99 with the given state number.
 * Replace the white heart with a newline/CR.