Jump to content

Template:Template usage: Difference between revisions

From Fifth Empire Wiki
No edit summary
improve the regex tricky part
Line 28: Line 28:


           Add the tricky regexp part.
           Add the tricky regexp part.
           --> *\{{!}} *[^}]*<!-- optional space " *" around initial pipe  
           --> *\{{!}}[^}]*<!-- optional space " *" around initial pipe  
           initial pipe is \|, i.e. \{{!}}
           initial pipe is \|, i.e. \{{!}}
           Trickiest part: [character class] inverted with ^:  [^any char NOT }]  
           Trickiest part: [character class] inverted with ^:  [^any char NOT }]  
Line 93: Line 93:
           |{{lc:{{{template|{{{1|Template usage}}}}}}}}|1|1}}&#93;{{#invoke:String|sub  
           |{{lc:{{{template|{{{1|Template usage}}}}}}}}|1|1}}&#93;{{#invoke:String|sub  
           |{{{template|{{{1|Template usage}}}}}}|2}}<!--    ^
           |{{{template|{{{1|Template usage}}}}}}|2}}<!--    ^
         --> *\{{!}} *&#91;^}&#93;*<!-- optional space " *" around initial pipe  
         --> *\{{!}}&#91;^}&#93;*<!-- optional space " *" around initial pipe  
         -->{{#invoke:String|replace
         -->{{#invoke:String|replace
           |{{#invoke:String|replace
           |{{#invoke:String|replace

Revision as of 23:54, 16 July 2015

Testing {{{2}}} on this page