Curator "regular expression matching with timestrings"

Curator docs say

What this means is that a simple timestring to match year and month, %Y.%m will result in a regular expression like this: ^.*\d{4}\.\d{2}.*$ . This pattern will match any 4 digits, followed by a period . , followed by 2 digits, occurring anywhere in the index name.

It seems to me that a pattern like ^foo$ shouldn't match foo anywhere in an index name. Hopefully regex anchors actually work (against the whole index name string)? I assume one of those two sentences is wrong.

You’re missing that there are two .* immediately after the ^ and immediately before the $ anchors, meaning that the date string can occur anywhere inside the index name.

My bad. Just wasn't looking very closely. Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.