Add logic for multiple match line.