List expressions

Some handlers might implement resp. use the string range expand functionality. This is how it works:

Assume you want to define multiple versions for Snap2date. The following two commands will do the same:

!snap2date watch 14w30a 14w30b 14w30c 14w31a 14w31b 14w31c
!snap2date watch 14w[30,31][a-c]

As you might have noticed, range expressions are wrapped in brackets and are divided by commas like this: [expression,another_one]. You can define the following expressions:

Expression syntax

Type Example Description
string abc normal list item
range a-z range definition (can be numbers or characters)
negation ^expression removes this expression from the resulting list

Examples

# a-z with exceptions
[a-z,^d,^m-y] => abcefghijklz

# negations don't have to be at the end of the expression
[^d,^m-y,a-z] => abcefghijklz

# multiple expressions will result in an exponential amount of resulting items
[a-z][a-z][a-z] => more than 17k results

A word of warning

Expressions can quickly result in huge lists of entries. Some implementations might deny execution if the list is too large but it will be computed anyway. The following expression for example will result in almost 1 million list items:

14w[1-52][a-zzz]