Jump to content

Template:Template usage: Difference between revisions

From Fifth Empire Wiki
fix [ problem
No edit summary
Line 16: Line 16:
     You saw the starting / of the /regexp/.
     You saw the starting / of the /regexp/.


     -->[{{#invoke:String|sub<!-- first [ of "[Xx]"
     -->[{{#invoke:String|sub<!-- first [ of "[Xx]" <!-- building [Xx] -->
     Now save from an expensive, /regexp/i, case-insensitive search  
     Now save from an expensive, /regexp/i, case-insensitive search  
     by outputing [Xx] where x is first letter of template name. -->
     by outputing [Xx] where x is first letter of template name. -->
     |{{uc:{{{template|val}}}}}|1|1}}{{#invoke:String|sub
     |{{uc:{{{template|val}}}}}|1|1}}{{#invoke:String|sub
     |{{lc:{{{template|val}}}}}|1|1}}]{{#invoke:String|sub
     |{{lc:{{{template|val}}}}}|1|1}}]{{#invoke:String|sub <!-- built [Xx] -->
     |{{{template|val}}}|2}}\{{!}}<!-- Template name and its pipe: \|, i.e. {{!}}
     |{{{template|val}}}|2}}\{{!}}<!-- Template name and its pipe: \|, i.e. {{!}}
     Trickiest part: [character class] inverted with ^:  [^any char NOT }]  
     Trickiest part: [character class] inverted with ^:  [^any char NOT }]  
Line 61: Line 61:


     | name = <kbd>{{{name|{{#invoke:String|replace
     | name = <kbd>{{{name|{{#invoke:String|replace
     {{#invoke:String|replace
     |{{#invoke:String|replace
     |hastemplate:"{{{template|Val}}}"<!--
     |hastemplate:"{{{template|Val}}}"<!--
     --> insource:/\{<!--
     --> insource:/\{<!--
Line 115: Line 115:
         }}
         }}
       | name = {{{name|{{#invoke:String|replace
       | name = {{{name|{{#invoke:String|replace
       {{#invoke:String|replace
       |{{#invoke:String|replace
       |Test regexp. Locate {{{template|Val}}}|[|&#91;}}|]|&#93;}}}}}
       |Test regexp. Locate {{{template|Val}}}|[|&#91;}}|]|&#93;}}}}}
     }}<!-- end plainlinks #2 -->
     }}<!-- end plainlinks #2 -->
Line 159: Line 159:
       | name =  
       | name =  
       <kbd>{{{name|{{#invoke:String|replace
       <kbd>{{{name|{{#invoke:String|replace
       {{#invoke:String|replace
       |{{#invoke:String|replace
       |hastemplate:"{{{template|Val}}}"<!--
       |hastemplate:"{{{template|Val}}}"<!--
       --> prefix:{{#switch:{{{prefix}}}
       --> prefix:{{#switch:{{{prefix}}}
Line 198: Line 198:
         }}
         }}
       | name =  <kbd>{{{name|{{#invoke:String|replace
       | name =  <kbd>{{{name|{{#invoke:String|replace
       {{#invoke:String|replace
       |{{#invoke:String|replace
       |hastemplate:"{{{template|Val}}}"|[|&#91;}}]|&#93;}}}}}</kbd>
       |hastemplate:"{{{template|Val}}}"|[|&#91;}}|]|&#93;}}}}}</kbd>
     }} <!-- end plainlinks #4 -->
     }} <!-- end plainlinks #4 -->
   }} <!-- end of second nested #if:prefix -->
   }} <!-- end of second nested #if:prefix -->
}}</onlyinclude><!-- end of first, opening #if:pattern -->
}}</onlyinclude><!-- end of first, opening #if:pattern -->
<noinclude>{{Documentation}}</noinclude>
<noinclude>{{Documentation}}</noinclude>

Revision as of 21:56, 29 June 2015

hastemplate:"Val"