Remove non-capturing groups