fixing a bug caused by DOS formatted newling \r\n
fixing a re expression, using [0-9] to be more generic