contains

Updated on Wednesday, 18 June, 2014 - 12:14
Purpose: 

To filter for a word or a phrase.

Type: 

The contains operator takes a string argument.

It uses tokenization on its arguments.

Case Sensitivity: 
Not case sensitive. Add the cs keyword to create a case-sensitive filter with contains.
Syntax: 

contains string

Synonyms: 
contains_word
contains_phrase
Examples: 

1. Filter for posts that include the phrase "web 2.0":

2. Filter for a Twitter user description that includes the phrase "social media expert".

3. Filter for posts that include the word "LOUD" in upper case.

4. Filter for posts that include the word "quiet" in lower case.

5. Filter for posts that include the word "Polish" but ignore posts that only mention "polish".

Notes: 

To find a sequence of characters within a word, use the substr operator.

contains matches whole words or whole phrases. The filter:

   interaction.contents contains "apple"

will not match:  "They served ham and pineapple pizza."