Anonymous user
User:松/Drafts/Extension:AbuseFilter/Rules format: Difference between revisions
User:松/Drafts/Extension:AbuseFilter/Rules format (view source)
Revision as of 22:36, 6 March 2020
, 4 years agotranslation tweaks
(10 times was actually on the low end. Adding a source as well.) |
(translation tweaks) |
||
Line 783:
| <code>count</code> || <translate><!--T:336--> Returns the number of times the needle (first string) appears in the haystack (second string).</translate> <translate><!--T:337--> If only one argument is given, splits it by commas and returns the number of segments.</translate>
|-
| <code>rcount</code> || <translate><!--T:338--> Similar to <tvar|1><code>count</code></> but the needle uses a regular expression instead.</translate> <translate><!--T:339--> Can be made case-insensitive by letting the regular expression start with "<tvar|2>(?i)</>".</translate> <translate><!--T:405--> Please note that, for plain strings, this function can be up to 50 times slower than <tvar|1><code>count</code
|-
| <code>get_matches</code> || {{MW version-inline|MW 1.31+}} <translate><!--T:340--> Looks for matches of the regex needle (first string) in the haystack (second string).</translate> <translate><!--T:341--> Returns an array where the 0 element is the whole match and every <tvar|1><code>[n]</code></> element is the match of the n'th capturing group of the needle.</translate> <translate><!--T:342--> Can be made case-insensitive by letting the regular expression start with "<tvar|1>(?i)</>".</translate> <translate><!--T:343--> If a capturing group didn't match, that array position will take value of ''false''.</translate>
|