Changed parser to use open() instead of fileinput and using regex for better readability