use strpbrk in extract_head