reading input file, working with regex