lib/sexp: add parameter expansion for regex and wildcard