Difference between revisions of "Template:Extract-Server"

From MK8
Jump to navigation Jump to search
m (Protected "Template:Extract-Server": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
Line 1: Line 1:
<includeonly>{{#replace:{{#sub:{{{1}}}|0|{{#pos:{{{1}}}|/|8}}}}|http://|}}</includeonly><noinclude>Extract the server name of a url.
+
<includeonly>{{#switch:{{#replace:{{#replace:{{#replace:{{#sub:{{{1}}}|0|{{#pos:{{{1}}}|/|8}}}}|http://}}|https://}}|www.}}
 +
| 2shared.com              = 2shared
 +
| 4shared.com              = 4shared
 +
| app.box.com
 +
| www.box.com              = Box
 +
| cdn.discordapp.com        = Discord
 +
| db.tt
 +
| dl.dropboxusercontent.com
 +
| dropbox.com              = Dropbox
 +
| docs.google.com
 +
| drive.google.com          = Google Drive
 +
| sites.google.com          = Google Sites
 +
| mediafire.com            = MediaFire
 +
| mega.co.nz
 +
| mega.nz                  = MEGA
 +
| 1drv.ms                  = OneDrive
 +
| puu.sh                    = puush
 +
| sendspace.com            = SendSpace
 +
| download.wiimm.de        = wiimm.de
 +
| youtube.com              = YouTube
 +
| www2.zippyshare.com      = Zippyshare
 +
| {{#replace:{{#replace:{{#sub:{{{1}}}|0|{{#pos:{{{1}}}|/|8}}}}|http://www.}}|http://}}
 +
}}</includeonly><noinclude>Extract the server name of a url.
  
Example: <tt><nowiki>{{Extract-Server|http://wit.wiimm.de/wit}}</nowiki></tt>
+
Example: <code><nowiki>{{Extract-Server|http://wit.wiimm.de/wit}}</nowiki></code>
  
 
Result: {{Extract-Server|http://wit.wiimm.de/wit}}
 
Result: {{Extract-Server|http://wit.wiimm.de/wit}}
[[category:Template/String Helper]]
+
 
</noinclude>
+
[[Category:Template/String Helper]]</noinclude>

Revision as of 22:13, 6 May 2017

Extract the server name of a url.

Example: {{Extract-Server|http://wit.wiimm.de/wit}}

Result: wit.wiimm.de