Fixed broke regex string

The regex would not account for platforms that used \r instead of \n, resulting in no errors being displayed.