Jump to content

User:松/Drafts/Extension:AbuseFilter/Rules format: Difference between revisions

Line 677:
| <code>get_matches</code> || {{MW version-inline|MW 1.31+}} Looks for matches of the regex needle (first string) in the haystack (second string).Returns an array where the 0 element is the whole match and every <code>[n]</code> element is the match of the n'th capturing group of the needle.Can be made case-insensitive by letting the regular expression start with "(?i)".If a capturing group didn't match, that array position will take value of ''false''.
|-
| <code>ip_in_range</code> || Returns true if user's IP (first string) matches the specified IP range (second string, in [[:enw:CIDR notation|CIDR notation]]).Only works for anonymous users.Supports both IPv4 and IPv6 addresses.
|-
| <code>contains_any</code> || Returns true if the first string contains '''any''' string from the following arguments (unlimited number of arguments in logic OR mode).If the first argument is an array, it gets casted to string.
222

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.