rhub
sign in
map people groups locations

  # ? homehelp

Messaging, Filter Syntax

Contents

[edit] Message Filter Syntax

The filter syntax lets you include or exclude messages on the basis of the words in the messages.

You can use the exclamation mark (!) to indicate that you don't want something. For example, the filter "coffee" matches any message that contains the word "coffee", but the filter "!coffee" only matches messages that don't contain "coffee".

An asterix (*) may be used to mean any word, and !* used to denote no words. For example, to get every message, use *. To get no messages, use !*.


There are two forms of syntax: 1. Inclusive

2. Exclusive

If you'd like to have a play with filters to see which messages might get filtered and which won't, visit the Message Filter Lab.

[edit] Inclusive

This filter is a list of words to match against. Any message that does not have at least one of the listed word will not match. For example, a filter 'info help' will match messages "anyone have any info on tomorrow?" and "can someone please come over to help us", but will not match "who's coming to the party tomorrow?"

Another way to read this kind of filter is to imagine 'or' between each word. The filter "info help" can be read as "messages that contain 'info' or 'help'".

[edit] Exclusive

If the first filter part is prefixed with an ampersand ('&'), words are combined in an 'and' fashion. For example, the filter "&!chat party !help" can be read as "Messages that contain 'party' but not those that contain 'chat' and 'help'"

[edit] Examples

[edit] Messages

Here are our example messages

1. Anyone up for a party or beer tonight?

2. I'm at enjoying some beer

3. Music is good, worth coming to for the party too

4. Anyone out on the town tonight?


[edit] Filters

If we had the following filters, these are the messages that would be received

"party" = 1, 3

"tonight chat" = 1, 3, 4

"party !beer" = 3, 4

"&party !beer" = 3 (exclusive)

"&party beer" = 1 (exclusive)

[edit] Experiment

Visit the Message Filter Lab to experiment with filters.

[edit] See Also

Retrieved from "http://rhub.net/wiki/Messaging%2C_Filter_Syntax"
Powered by MediaWiki

 

Help! | Console | Getting Started | Sitemap | Search | Feedback | About

Navigation
 
Personal tools

Extra