diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-03-11 17:25:20 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-03-11 17:25:20 +0100 |
commit | de1593412099dd36b0611d00776adb4bdc1805e1 (patch) | |
tree | 2a40abbd5cef1f371a3a3a712a66bb7ecfd61f26 | |
parent | 3178068b962bca4f97d5e69a96375b865feb8d01 (diff) | |
download | vicious-legacy-de1593412099dd36b0611d00776adb4bdc1805e1.tar.xz |
fs: further improve the regexp
-rw-r--r-- | fs.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |