Content deleted Content added
Rv |
→Lua patterns: Updated patterns here in docs to reflect changes to the regex of Module:Infobox3cols; used {{tl}} |
||
Line 32:
=== Lua patterns ===
This module supports [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]] (similar to [[regular expression]]s), which are useful when there are many known parameters which use a systematic pattern. For example,
<pre>
| regexp1 = header[%d]
| regexp2 = label[%d]
| regexp3 = data[%d]
| regexp4 = class[%d]
| regexp5 = rowclass[%d]
| regexp6 = rowstyle[%d]
| regexp7 = rowcellstyle[%d]
</pre>
to match all parameters of the form <code>headerNUM</code>, <code>labelNUM</code>, <code>dataNUM</code>, <code>dataNUMa</code>, <code>dataNUMb</code>, <code>dataNUMc</code>, ..., <code>rowcellstyleNUM</code>, where NUM is a string of digits.
|