Fixed error message reporting for the case when regex exhaust tested string