Manjaro Difference between revisions of "User:Megavolt/regex"

Difference between revisions of "User:Megavolt/regex"

From Manjaro
m (added "prepare lists")
m (correction)
Line 30: Line 30:
|-
|-
| prepare lists
| prepare lists
| <nowiki>(?!(\* |\*  )(''|''')(\[\[|\[))(\* |\*  )([A-Za-z0-9 '+-_#,.()]+)</nowiki>
| <nowiki>(?!(\* |\*  )(''|''')(\[\[|\[)|(\* |\*  )<translate>)(\* |\*  )([A-Za-z0-9 '+-_#,.()]+)</nowiki>
| <nowiki>* <translate>$1</translate></nowiki>
| <nowiki>* <translate>$4</translate></nowiki>
|}
|}

Revision as of 13:00, 29 March 2021


Here i will add a list of regex commands for daily usage for remembering.

description Search Replace
Add "Special:MyLanguage" to internal links (?!\[\[(C|c)ategory:|\[\[(F|f)ile:|\[\[(I|i)mage:|\[\[(S|s)pecial:MyLanguage/)\[\[([A-Za-z0-9 '+-_#]+)\]\] [[Special:MyLanguage/$5|<translate>$5</translate>]]
(?!\[\[(C|c)ategory:|\[\[(F|f)ile:|\[\[(I|i)mage:|\[\[(S|s)pecial:MyLanguage/)\[\[([A-Za-z0-9 '+-_#]+)\|([A-Za-z0-9 '+-_#]+)\]\] [[Special:MyLanguage/$5|<translate>$6</translate>]]
Remove misc tags of the translate extension <!--T:\d+-->
<(/|)translate>
prepare categories \[\[((C|c)ategory:([A-Za-z0-9 '+-_#]+))\]\] [[$1{{#translation:}}]]
\[\[(:(C|c)ategory:([A-Za-z0-9 '+-_#]+))\]\] [[$3{{#translation:}}|<translate>$3</translate>]]
\[\[(:(C|c)ategory:([A-Za-z0-9 '+-_#]+)\|([A-Za-z0-9 '+-_#]+))\]\] [[$3{{#translation:}}|<translate>$4</translate>]]
prepare lists (?!(\* |\* )(''|''')(\[\[|\[)|(\* |\* )<translate>)(\* |\* )([A-Za-z0-9 '+-_#,.()]+) * <translate>$4</translate>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.