From de1593412099dd36b0611d00776adb4bdc1805e1 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Thu, 11 Mar 2010 17:25:20 +0100 Subject: fs: further improve the regexp --- fs.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs.lua b/fs.lua index 27934c4..fdc35aa 100644 --- a/fs.lua +++ b/fs.lua @@ -30,8 +30,8 @@ local function worker(format, nfs) local fs_info = {} for line in f:lines() do -- Match: (size) (used)(avail)(use%) (mount) - local s = string.match(line, "^.-[%s]+([%d]+)") - local u,a,p = string.match(line, "([%d]+)[%s]+([%d]+)[%s]+([%d]+)%%") + local s = string.match(line, "^.-[%s]([%d]+)") + local u,a,p = string.match(line, "([%d]+)[%D]+([%d]+)[%D]+([%d]+)%%") local m = string.match(line, "%%[%s]([%p%w]+)") if u and m then -- Handle 1st line and broken regexp -- cgit v1.2.3