Thomas Williams, York and Lancaster Regiment