All of the variables support basic string substitution inspired by bash. The details
differ however, for example all patterns are treated as simple string comparisons. There
is no regex support. For example you can do the following:
$(ROLL_NAME/search/replace)
. This means if your roll name is e.g. 1970-01-01_RAW_Time-Begins
and you use
$(ROLL_NAME/RAW/JPG)
it will result in a roll name of: 1970-01-01_JPG_Time-Begins
$(var-default)
|
If
var
is empty, use
default
.
|
$(var+alt_value)
|
If
var
is set, use
alt_value
, else use empty string.
|
$(var:offset)
|
var
starting from
offset
. If
offset
is less than zero it is counted from the back of the string.
|
$(var:offset:length)
|
At most
length
characters of
var
, starting from
offset
. If
offset
is less than zero it is counted from the back of
var
. If
length
is less than zero it indicates the end of the result, counted from the back of
var
, and not an actual length.
|
$(var#pattern)
|
Remove
pattern
from the start of
var
.
|
$(var%pattern)
|
Remove
pattern
from the end of
var
.
|
$(var/pattern/replacement)
|
Replace the first occurrence of
pattern
in
var
with
replacement
. If
replacement
is empty then
pattern
will be removed.
|
$(var//pattern/replacement)
|
Replace all occurrences of
pattern
in
var
with
replacement
. If
replacement
is empty then
pattern
will be removed.
|
$(var/#pattern/replacement)
|
If
var
starts with
pattern
then
pattern
is replaced with
replacement
.
|
$(var/%pattern/replacement)
|
If
var
ends with
pattern
then
pattern
is replaced with
replacement
.
|
$(var^)
|
Make the first character of
var
uppercase.
|
$(var^^)
|
Make all characters of
var
uppercase.
|
$(var,)
|
Make the first character of
var
lowercase.
|
$(var,,)
|
Make all characters of
var
lowercase.
|