Template:Str test
Template Documentation [Edit]
This is an in-line documentation.
This template has been applied to 14000+ pages.
To avoid massive damage and unnecessary server load, any changes should be made in the Sandbox template page, or your own user page. After testing, this template can be changed at one time. To respect other users, any changes should be discussed on the talk page before taking effect. |
Introduction
This template will determine whether the regular expression can match the string. If it matches at least one result successfully, it will output 1 by default, otherwise it will output empty.
parameters
- str: the string to match, this parameter also corresponds to anonymous parameter 1
- ptn: Regular expression, which can be passed in in the format of
<nowiki>
tags. This parameter also corresponds to anonymous parameter 2 - then: match to output, default is number 1
- else: no output matched