We describe a sound, terminating, and complete matching algorithm for terms built over flexible arity function symbols and context, function, sequence, and individual variables. Context and sequence variables allow matching to move in term trees to arbitrary depth and breadth, respectively. The values of variables can be constrained by regular expressions which are not necessarily linear. We describe heuristics for optimization, and discuss applications.