Expand matching for regex