diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -276,7 +276,7 @@ async function exec(options = {}) {
   }
   if (errorLines.length) {
     let error = errorLines.join('\n');
-    error = error.replace(/===*.*====*\nLicense acceptance recorded. Continuing.\n?/, '');
+    error = error.replace(/===*.*====*\\nLicense acceptance recorded. Continuing.\n?/, '');
     const acceptLicenseMessage = /To accept the message please run speedtest interactively or use the following:[\s\S]*speedtest --accept-license/;
     const acceptGdprMessage = /To accept the message please run speedtest interactively or use the following:[\s\S]*speedtest --accept-gdpr/;
     if (acceptLicenseMessage.test(error)) {
fix: fix regex issue in error check

escaped \n in the regex check, as the string to test is using \n as string. this fixes an issue where the "license accepted" info message would throw an error.