1[WARNING]
2.A word about regular expression matching with timestrings
3==========================================================
4Timestrings are parsed from strftime patterns, like `%Y.%m.%d`, into regular
5expressions.  For example, `%Y` is 4 digits, so the regular expression for that
6looks like `\d{4}`, and `%m` is 2 digits, so the regular expression is `\d{2}`.
7
8What this means is that a simple timestring to match year and month, `%Y.%m`
9will result in a regular expression like this: `^.*\d{4}\.\d{2}.*$`.  This
10pattern will match any 4 digits, followed by a period `.`, followed by 2 digits,
11occurring anywhere in the index name.  This means it _will_ match monthly
12indices, like `index-2016.12`, as well as daily indices, like
13`index-2017.04.01`, which may not be the intended behavior.
14
15To compensate for this, when selecting indices matching a subset of another
16pattern, use a second filter with `exclude` set to `True`
17
18[source,yaml]
19-------------
20- filtertype: pattern
21 kind: timestring
22 value: '%Y.%m'
23- filtertype: pattern
24 kind: timestring
25 value: '%Y.%m.%d'
26 exclude: True
27-------------
28
29This will prevent the `%Y.%m` pattern from matching the `%Y.%m` part of the
30daily indices.
31
32*This applies whether using `timestring` as a mere pattern match, or as part of
33date calculations.*
34==========================================================
35