සැකිල්ල:ifmatch
{{{4}}}
- පහත දැක්වෙන උපදෙස්, සැකිල්ල:ifmatch/documentation හි පිහිටා ඇත. සැකිල්ල:ifmatch/documentation]]. [සංස්කරණය]
- ප්රයෝජනවත් සබැඳි: උප පිටු ලැයිස්තුව • සබැඳි • යළි යොමු • transclusions • errors (parser/module) • sandbox
Uses Lua: |
{{ifmatch|string with pattern in it|pattern|pattern was found|pattern wasn't found}}
{{ifmatch|s=string with pattern in it|pattern=pattern|if_true=pattern was found|if_false=pattern wasn't found}}
↓
- pattern was found
- pattern was found
Turn off Lua pattern syntax:
{{ifmatch|string with Lua pattern syntax %d matching number in it|%d|pattern was found|pattern wasn't found}}
{{ifmatch|string with Lua pattern syntax %d matching number in it|%d|pattern was found|pattern wasn't found|plain=true}}
↓
- pattern was found
- pattern was found
Turn off Unicode features (mw.ustring):
{{ifmatch|string with non-ASCII numbers ٠١٢٣٤ in it|%d|pattern was found|pattern wasn't found}}
{{ifmatch|string with non-ASCII numbers ٠١٢٣٤ in it|%d|pattern was found|pattern wasn't found|unicode=false}}
↓
- pattern was found
- pattern was found
{{#if:}}
is used, so if the |if_true=
or |if_false=
argument isn't visible, it doesn't have side effects:
{{ifmatch|string with pattern in it|pattern|pattern was found|{{DISPLAYTITLE:This display title won't be evaluated, so there isn't a "display title was ignored" error message in preview mode.}}}}
↓
- pattern was found