add ``regexp_matches`` scalar function implementation

is this first reset here necessary?