Template:Str test

From Moegirlpedia
Revision as of 17:00, 18 March 2022 by LiaMinina (talk | contribs) (Created page with "<includeonly>{{#if:{{#invoke:Str_test|main|{{{str|{{{1|}}}}}}|{{{ptn|{{{2|}}}}}}}}|{{{then|1}}}|{{{else|}}}}}</includeonly><noinclude>{{Documentation|content= {{Template:High-...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Template-info.svg Template Documentation  [Edit]

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