Thread based on regexp.