Update cmd_overrides + stripArtifacts regex

This commit is contained in:
billz 2023-10-21 19:12:44 +01:00
parent 1e6d94585a
commit ee662ada09
2 changed files with 3 additions and 2 deletions

View file

@ -7,7 +7,8 @@
"install_page": "https://www.expressvpn.com/support/vpn-setup/app-for-linux/",
"cmd_overrides": {
"countries": "list all",
"log": "diagnostics"
"log": "diagnostics",
"version": "-v"
},
"regex": {
"status": "\/not connected\/",

View file

@ -122,7 +122,7 @@ function saveProviderConfig($status, $binPath, $country, $id = null)
*/
function stripArtifacts($output, $pattern = null)
{
$result = preg_replace('/[-\/\n\t\\\\'.$pattern.'|]/', '', $output);
$result = preg_replace('/[-\/\n\t\\\\'.$pattern.'|\[0m\[1;33;49m]/', '', $output);
return $result;
}