Module:Check for unknown parameters/doc: Difference between revisions

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, [[template:infobox3cols]]{{tl|Infobox3cols}} uses
<pre>
| regexp1 = header[%d][%d]*+
| regexp2 = label[%d][%d]*+
| regexp3 = data[%d][%d]*+[abc]?
| regexp4 = class[%d][%d]*+[abc]?
| regexp5 = rowclass[%d][%d]*+
| regexp6 = rowstyle[%d][%d]*+
| regexp7 = rowcellstyle[%d][%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.