The advanced Content Filter uses Symfony's Expression Language.
This help page includes a summary of [the Symfony's Expression Language documentation page.](https://symfony.com/doc/current/components/expression_language/syntax.html)
## Basics
The advanced content filter matches each post that is about to be displayed against each enabled rule you set.
A rule is a boolean expression that should return either `true` or `false` depending on post variables.
If the expression using a post variables returns `true`, the post will be collapsed and the matching rule name will be displayed above the collapsed content.
A post will be collapsed if at least one rule matches, but all matching rule names will be displayed above the collapsed content.
2. To block everything that contains the words `body matches "/Guten Morgen/"
3. To block every occurence of the word facebook with a space in front and after the word `body matches "//s facebook/s /"`
4. To colapse every post that contains more than 1 image `body matches "/(?:(?:(?:\\[url(?:=.*)?\\])?\\[img(?:=.*)?\\].*\\[\\/img\\]\\s*(?:\\[\\/url\\])?)\\s*){2}/"`
Control characters (e.g. ``\n``) in expressions are replaced with whitespace. To avoid this, escape the sequence with a single backslash (e.g. ``\\n``).
[attachment type='link' url='https://www.eyeem.com/p/120800309' title='Over-compensation Street Night Car Lights Jeep No | EyeEm' image='https://cdn.eyeem.com/thumb/b2f019738cbeef06e2f8c9517c6286a8adcd3a00-1522184820641/640/480']Photo by @[url=https://twitter.com/MrPetovan]MrPetovan[/url][/attachment]</td>
Over-compensation #<a href="https://friendica.mrpetovan.com/search?tag=Street" class="tag" title="Street">Street</a> #<a href="https://friendica.mrpetovan.com/search?tag=Night" class="tag" title="Night">Night</a> #<a href="https://friendica.mrpetovan.com/search?tag=CarLights" class="tag" title="CarLights">CarLights</a> #<a href="https://friendica.mrpetovan.com/search?tag=Jeep" class="tag" title="Jeep">Jeep</a> #<a href="https://friendica.mrpetovan.com/search?tag=NoPeople" class="tag" title="NoPeople">NoPeople</a> #<a href="https://friendica.mrpetovan.com/search?tag=Close" class="tag" title="Close">Close</a>-up <div class="type-link"><a href="https://www.eyeem.com/p/120800309" target="_blank"><img src="https://friendica.mrpetovan.com/proxy/bb/aHR0cHM6Ly9jZG4uZXllZW0uY29tL3RodW1iL2IyZjAxOTczOGNiZWVmMDZlMmY4Yzk1MTdjNjI4NmE4YWRjZDNhMDAtMTUyMjE4NDgyMDY0MS82NDAvNDgw" alt="" title="Over-compensation Street Night Car Lights Jeep No | EyeEm" class="attachment-image"></a><br><h4><a href="https://www.eyeem.com/p/120800309">Over-compensation Street Night Car Lights Jeep No | EyeEm</a></h4><blockquote>Photo by @<a href="https://twitter.com/MrPetovan" class="userinfo mention" title="MrPetovan">MrPetovan</a></blockquote><sup><a href="https://www.eyeem.com/p/120800309">www.eyeem.com</a></sup></div>
</td>
</tr>
<tr>
<th>object</th>
<td>string</td>
<td>{"created_at":"Tue Mar 27 21:07:02 +0000 2018","id":978740198937907200,"id_str":"978740198937907200","full_text":"Over-compensation #Street#Night#CarLights#Jeep#NoPeople#Close-up https:\/\/t.co\/7w4ua13QA7","truncated":false,"display_text_range":[0,93],"entities":{"hashtags":[{"text":"Street","indices":[18,25]},{"text":"Night","indices":[26,32]},{"text":"CarLights","indices":[33,43]},{"text":"Jeep","indices":[44,49]},{"text":"NoPeople","indices":[50,59]},{"text":"Close","indices":[60,66]}],"symbols":[],"user_mentions":[],"urls":[{"url":"https:\/\/t.co\/7w4ua13QA7","expanded_url":"http:\/\/EyeEm.com\/p\/120800309","display_url":"EyeEm.com\/p\/120800309","indices":[70,93]}]},"source":"<a href=\"http:\/\/www.eyeem.com\" rel=\"nofollow\">EyeEm<\/a>","in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":403748896,"id_str":"403748896","name":"\ud83d\udc30yp\ud83e\udd5ali\u271d\ufe0fe Pet\ud83e\udd5avan","screen_name":"MrPetovan","location":"NYC","description":"White male form of milquetoast. Avatar by @DearMsDear inspired by @TSG_LAB.\n\nFriendica\/Diaspora\/Mastodon: hypolite@friendica.mrpetovan.com","url":"https:\/\/t.co\/PcARi5OhQO","entities":{"url":{"urls":[{"url":"https:\/\/t.co\/PcARi5OhQO","expanded_url":"https:\/\/mrpetovan.com","display_url":"mrpetovan.com","indices":[0,23]}]},"description":{"urls":[]}},"protected":false,"followers_count":182,"friends_count":146,"listed_count":15,"created_at":"Wed Nov 02 23:13:14 +0000 2011","favourites_count":45826,"utc_offset":-14400,"time_zone":"Eastern Time (US & Canada)","geo_enabled":false,"verified":false,"statuses_count":15554,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/370213187\/fond_twitter_mrpetovan.png","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/370213187\/fond_twitter_mrpetovan.png","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/968008546322395136\/6qLCiu0o_normal.jpg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/968008546322395136\/6qLCiu0o_normal.jpg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/403748896\/1464321684","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"000000","profile_use_background_image":true,"has_extended_profile":true,"default_profile":false,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false,"translator_type":"none"},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":0,"favorite_count":0,"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}</td>