Using a more resiliant regex to match header keys and values.