setexpr: add regex substring matching and substitution