if line.match(pattern.re).isSome:
    

looks not really smart for me. You may create a new regex for each loop 
iteration.

Reply via email to