Updated pattern compiler to produce identity and regex with named groups.