expr

Name

expr -- evaluate expressions

Description

expr is as specified in the SUS but supports extra operands as listed below.

Extra Operands

match STRING REGEXP

is same as STRING : REGEXP.

substr STRING POS LENGTH

is substring of STRING, POS counted from 1.

index STRING CHARS

is index in STRING where any CHARS is found, or 0.

length STRING

is length of STRING.

quote STRING

interprets TOKEN as a string, even if it is a keyword like match or an operator like /.