wifi: improved SSID regular expression
Current regular expression only matches two words ESSIDs, the other day I was at a friend's home with SSID "The Dark Tower". I was getting N/A. Signed-off-by: Amir Mohammad Saied <amirsaied@gmail.com> Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
This commit is contained in:
parent
932bd8dfcb
commit
49b0913b04
|
@ -55,7 +55,7 @@ local function worker(format, warg)
|
||||||
-- Output differs from system to system, some stats can be
|
-- Output differs from system to system, some stats can be
|
||||||
-- separated by =, and not all drivers report all stats
|
-- separated by =, and not all drivers report all stats
|
||||||
winfo["{ssid}"] = -- SSID can have almost anything in it
|
winfo["{ssid}"] = -- SSID can have almost anything in it
|
||||||
string.match(iw, 'ESSID[=:]"([%w%p]+[%s]*[%w%p]*]*)"') or winfo["{ssid}"]
|
string.match(iw, 'ESSID[=:]"([%w%p]+[%s%w%p]*]*)"') or winfo["{ssid}"]
|
||||||
winfo["{mode}"] = -- Modes are simple, but also match the "-" in Ad-Hoc
|
winfo["{mode}"] = -- Modes are simple, but also match the "-" in Ad-Hoc
|
||||||
string.match(iw, "Mode[=:]([%w%-]*)") or winfo["{mode}"]
|
string.match(iw, "Mode[=:]([%w%-]*)") or winfo["{mode}"]
|
||||||
winfo["{chan}"] = -- Channels are plain digits
|
winfo["{chan}"] = -- Channels are plain digits
|
||||||
|
|
Loading…
Reference in New Issue