let the strings consist of lowercase alphabets for simplicity, so `[a-z]`

is one character

The accepted lengths are a sequence 2, 4, 5, 8, 10, 11, 14, 16, 17, 20, 22, ...
We can group these as {2}, {4,5,8}, {10,11,14}, {16,17,20}, ...

Notice that 4 on the addition of 6 gives 10, 5 on the addition of 6 gives 11, and so on.

To build the regex, consider the special cases first:
length of 2, regex would be `[a-z]{2}`

similarly for lengths 4, 5 and 8 regex would be `[a-z]{4}`

, `[a-z]{5}`

, `[a-z]{8}`

For lengths greater than 8, zero or more, six-character string is appended
so the final regex would be

```
[a-z]{2} + ( [a-z]{4} )( [a-z]{6} )* + ( [a-z]{5} )( [a-z]{6} )* + ( [a-z]{8} )( [a-z]{6} )*
```