There are multiple strings like below

```
trunk.2013.11.13
trunk.2013.11.17
trunk.2013.12.31
trunk.2014.01.05
trunk.2014.01.07

```

Regex to include all strings from dec 2013 will look like this, 

```
trunk.2013.12...|trunk.201[^123]......|trunk.20[^01].......

```

Is there some tool/script/library/codereceipe that can help build such regex given date range? Unfortunately it has to be a regex, as it is part of some configuration file. Writing the regex manually for each date is a pain and difficult to get right. Also, an automated tool might generate a better shorter regex instead of the manually written one.

Note:

1. Assume the strings are already valid dates and always appear in a fixed format. There is no need to validate dates in the regex.