yCal Help

How to: use smart markers

Smart markers allow to mark days in the year view automatically based on normal events and their event titles. Smart markers are displayed in the year view exactly the same way as standard markers are displayed; however, you don't have to manually mark days, and no markings will be created and stored in a special marker calendar. Instead, yCal will automatically and continuously scan all events in a given calendar and will display markings in the year view whenever an event title matches a given criteria.

Setting up a smart marker

Creating a smart marker is very similar to creating a standard marker. You can choose New SmartMarker... from the File menu, hit the little + button at the lower left corner, or use the context menu (right-click) in the left pane with the list of your calendars and markers.

The smart marker configuration sheet is to a large extent identical to the standard marker configuration sheet: It lets you set the smart marker's name and color, type in a description, and choose a marker style.

In addition, you'll find a field to enter a match event title expression and a selector for the calendar to search in. The match string defines the text yCal will search for in event titles: If yCal finds events in the given calendar which match this text, the respective days will be marked in the year view.

Please be aware that the match string has to be entered as a regular expression. Regular expressions are much more powerful than simple text when it comes to expressing search terms — e.g., you can use wildcards, count characters or define search locations within a string. That means, there are certain characters which have special meaning in regular expressions, so you shouldn't use them if you're unaware of regular expressions and just want to search for plain text. In particular, these characters are |, *, +, ?, {, }, ^, \, $, (, ), [, ], and the dot. Please see below for a short introduction to regular expressions and for some examples.

In addition, you may also specify to only search for fullday events. If this checkbox is selected, yCal will apply the matching string only to fullday events.

Regular expressions — intro and examples

A regular expression (also known as RegExp) is a string or sequence of characters that specifies a search pattern. It can describe a large number of possibilities in a concise notation. There are many great books, articles and tutorials out there which describe the powers of regular expressions and which will teach you all you may ever want to know about RegExp — just google for the term and you'll find a lot to read. At this point, let's just look at a few examples:

Regular expressions — quick reference

The following tables will give you a quick overview of the most important special characters and character sequences in regular expressions. Those can be combined to build very complex and powerful search expressions.

Operators

|or
*0 or more times
+1 or more times
?0 or 1 times
{n}exactly n times
{n,}n or more times
{n,m}between n and m times

Anchors

^beginning of string
$end of string
.any character
\quote (escape) following character

Character classes

\bword boundary if outside a [set]; backspace if within a [set]
\Bnot a word boundary
\swhite space character
\Snon-white space character
\ddigit character
\Dnon-digit character
\wword character
\Wnon-word character

Sets

[...]any one character in the set
[^...]negated set: not any one in the set