The `regex' struct is both input and output.