From 87bd4a75e532837a5608491aedc9066264a9fd6f Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Wed, 13 Sep 2023 18:18:15 +1000 Subject: [PATCH] updated content filter doco --- doc/guide/en/Content_Filters.mc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/guide/en/Content_Filters.mc b/doc/guide/en/Content_Filters.mc index 8c387e1c1..f17e4a3c8 100644 --- a/doc/guide/en/Content_Filters.mc +++ b/doc/guide/en/Content_Filters.mc @@ -21,31 +21,33 @@ Then, any filters under **Only import posts with this text** are applied. Only m **Any text that doesn't start with one of the following: lang= lang!= # $ ? /** Case-insensitive text match -Example: `covid` (matches "covid", "COVID", "Covid", etc) +Example: `apple` (matches "apple", "APPLE", "Apples", "pineapple", "applesauce", etc.) +Example: `low sub` (matches "low sub", "low sub-zero", "Yellow Submarine", etc.) +NOTE: Beware of using short character sequences that will match many different words. You may want to use REGULAR EXPRESSIONS (see below). **LANGUAGE** **lang=** -Match language if it can be identified +Match language (if it can be identified) Example: `lang=de` (matches German-language content) **lang!=** -Anything except this language +Match anything except this language (if it can be identified) Example: `lang!=en` (matches non-English content) **HASHTAG** -**#[zrl=https://forum.statler.ws/search?tag=%2A%2A]**[/zrl] +**#** Match hashtag -Example: `#[zrl=https://forum.statler.ws/search?tag=cats%60]cats`[/zrl] +Example: `#cats` **CATEGORY** **$** -Match category (requires installing the **Categories** app). Categories are "personal hashtags" that do not generally federate with other instances. +Match category. (Categories are "personal hashtags" that only apply to a single channel. Very few Fediverse platforms support categories. You can enable them for your channel by installing the **Categories** app.) Example: `$Science` @@ -58,8 +60,9 @@ Discussed below under **Advanced Filters** **REGULAR EXPRESSIONS (REGEX)** **/** -Match a "regular expression". See numerous online help sites such as [Regular-Expressions.info](https://www.regular-expressions.info/) for regex assistance. +Match a "regular expression". See numerous online help sites such as [Regular-Expressions.info](https://www.regular-expressions.info/) and [regexr.com](https://regexr.com/) for regex assistance. Example: `/gr[ae]y/` (matches "gray" and "grey") +Example: `/\b[Ww]ar\b/` (matches the whole words "war" and "War", but not "wars", "warning", "software", etc.) ### Advanced Filters @@ -94,5 +97,4 @@ Example: `?verb == Announce` (matches ActivityPub "boosts") **?+** Field match: ?+field item.object -*Usage is undocumented at present*[/share] -@[zrl=https://forum.statler.ws/channel/billstatler]Bill Statler[/zrl] +*Usage is undocumented at present*