Template:LAuto/doc: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 10: | Line 10: | ||
*Search for: | *Search for: | ||
<pre> | <pre>\[\[(?!#|File(?:[ _]talk)?:|Image(?:[ _]talk)?:|Media:|Template(?:[ _]talk)?:|MediaWiki(?:[ _]talk)?:|Talk:|Category[ _]talk:|Project[ _]talk:|Valve[ _]Developer[ _]Community[ _]talk:|Help[ _]talk:|User(?:[ _]talk)?:|c:|commons:|Dictionary:|Google:|GoogleGroups:|IMDB:|M:|Meta:|Metawikipedia:|MW:|SdkBug:|SourceForge:|Steampowered:|W:|Wiki:|WikiBooks:|Wikipedia:|Wikiquote:|Wiktionary:|WP:)(:?(?:Category|Category|Help|Project|Valve[ _]Developer[ _]Community|Special):(?:[^\|\]]+))\|?(.*?)\]\]</pre> | ||
*Replace with: | *Replace with: | ||
<pre>{{subst:LAuto|$1|$2}}</pre> | <pre>{{subst:LAuto|$1|$2}}</pre> | ||
Revision as of 07:35, 15 September 2024
- {{subst:LAuto|Category:test}} = {{ACategory|Test}}
- {{subst:LAuto|:Category:test}} = {{LCategory|Test}}
- {{subst:LAuto|Help:test}} = {{LHelp|Test}}
- {{subst:LAuto|Valve Developer Community:test}} = {{LProject|Test}}
- {{subst:LAuto|test}} = {{L|Test}}
- {{subst:LAuto|Template:test}} = [[Template:test]]
Needed regex to filter out outside links
This is usable right in the editing tool bar under Advanced -> on the right side 'Search and replace' (magnifying glass icon) -> 'Treat search string as a regular expression' checkmark
- Search for:
\[\[(?!#|File(?:[ _]talk)?:|Image(?:[ _]talk)?:|Media:|Template(?:[ _]talk)?:|MediaWiki(?:[ _]talk)?:|Talk:|Category[ _]talk:|Project[ _]talk:|Valve[ _]Developer[ _]Community[ _]talk:|Help[ _]talk:|User(?:[ _]talk)?:|c:|commons:|Dictionary:|Google:|GoogleGroups:|IMDB:|M:|Meta:|Metawikipedia:|MW:|SdkBug:|SourceForge:|Steampowered:|W:|Wiki:|WikiBooks:|Wikipedia:|Wikiquote:|Wiktionary:|WP:)(:?(?:Category|Category|Help|Project|Valve[ _]Developer[ _]Community|Special):(?:[^\|\]]+))\|?(.*?)\]\]
- Replace with:
{{subst:LAuto|$1|$2}}