Added a couple of cases to the Regex

Added 2 regex conditions to remove empty lines and lines with space as the beginning.