api: add regex replace feature in function string_eval_expression