Brief advanced mode tutorial

This is meant to be a brief introduciton to the advanced mode filter management. It is not meant to explain every little detail and does not address all features.

The iCalendar format

In order to understand how icalfilter.com works, you need to know a little about the iCalendar format. The iCalendar format is a tree-like structure consisting of elements. Each element has a type, a number of properties and possibly also child elements.

A typical iCalendar file has this structure:

The icalfilter.com rules

icalfilter.com works by matching iCalendar elements with custom rules.

For each calendar element, the rules are tested in top-down order. If there is a match, lower rules will not be tested. If the rule's action is set to show, the element is kept, and if it is set to hide, the element is hidden. If none of the rules match, the element will also be hidden. If an element is hidden, all its child elements will consequently be hidden as well.

A calendar element gets matched by a rule if these conditions are met:

The rule's action decides what to do with the matched elements: show or hide.

If you are using custom regular expressions, you should use the PCRE regex syntax, with / as the delimiter.


After having created a new filter, it consists of one single rule, the base rule. It matches all types of elements and sets the action to show. It is meant to be the last rule tested and should normally not be moved or removed. You are free to modify it, but keep in mind that this might hide for example the VCALENDAR element, with the result of the whole calendar being hidden.

We want to add a new rule. We do this by clicking the add rule link above the rules. You can add more rules at the same time or do other changes, but you have to press reload to be able to edit your new rule.

After reloading, we have two rules. The base rule and the new rule. The new rule has the default filter of selecting elements of the event type (VEVENT) where the summary (SUMMARY) is exactly icalfilter.com example summary, case sensitive (CS). The default action is to hide this event. Now, let's change this to something more advanced and useful.

In the example below, I have changed the new rule's property filter to match a regular expression.

As said previously, when writing custom regular expressions, you should use PCRE regex syntax, with / as the delimiter. If you leave out the delimiter, it will not work.

The regular expression I have chosen is /([0-9]{4}) | (laboration)/i, which matches a sequence of 4 digits or the text laboration. The internal option setting i after the last delimiter tells the regex engine that text matching should be case insensitive. This new rule will match all event elements where the summary matches this regex. The action is chosen to hide.

The rule needs to be saved before it is operational, which is why it is marked with a blue color. There is also a bar at the top of the page (not shown in the image) with this same color telling you that You have made some changes to your rules. Don't forget to save them. To save the rule, press the save button next to the rule. If you have done changes to other rules, you should save them too.

The rule is saved and the new set of rules is operational. The bar at the top of the page will now tell you that you need to reload the page to see the effect of the new set of rules. Simply click the link to reload the page.

Finally, we see the effect of the added rule. It matches 54 elements and the base rule now only matches the 28 elements that are not matched by the first rule. Everything seems to be working. If you can manually refresh your calendar feed in your calendar reader, you should do so now. Otherwise, you have to wait for the automatic update.

If there is something you wonder about, don't hesitate to ask. The comments thread on the main page is a great way of giving feedback.


icalfilter.com is provided by klargodut.com

Flattr this