User:松/Drafts/Extension:AbuseFilter/Rules format: Difference between revisions
User:松/Drafts/Extension:AbuseFilter/Rules format (view source)
Revision as of 13:39, 13 August 2020
, 3 years agoTranslation code removal.
(Translation code removal.) |
|||
Line 630:
* <translate><!--T:299--> <tvar|1><code>rlike</code></> (or <tvar|2><code>regex</code></>) and <tvar|3><code>irlike</code></> return true if the left-hand operand matches (contains) the [[w:Regular expression|regex]] pattern in the right-hand operand (<tvar|4><code>irlike</code></> is case '''i'''nsensitive).</translate>
The system uses [[w:Perl Compatible Regular Expressions|PCRE]].The only PCRE option enabled is
▲The only PCRE option enabled is <tvar|1><code>PCRE_UTF8</code></> (modifier <tvar|2><code>u</code></> [<tvar|3>https://php.net/reference.pcre.pattern.modifiers</> in PHP]); for <tvar|4><code>irlike</code></> both <tvar|5><code>PCRE_CASELESS</code></> and <tvar|6><code>PCRE_UTF8</code></> are enabled (modifier <tvar|7><code>iu</code></>).
*
*
*
*
'''
<!--Note: these examples are also used in https://phabricator.wikimedia.org/diffusion/EABF/browse/master/tests/parserTests/mwexamples-keywords.t -->
{| class="wikitable"
|-
! Code
! Result
! Comment
|-
| <code>"1234" like "12?4"</code>
|