BUG: Fixed regular expression to only count valid lines in DICOM header