|Do you know where your variables are?|
more elegant way to parse this?by morgon (Priest)
|on Feb 24, 2017 at 04:58 UTC||Need Help??|
morgon has asked for the wisdom of the Perl Monks concerning the following question:
on OpenWrt I try to find out about visible wifi-networks by parsing the output of iw scan.
This output looks like this:
What I am interested in is the set of all ssids, each being contained in a stanza that starts with "BSS" and ends when the next "BSS" is encountered.
So I parse it like this:
And that works, but it bugs me that I manually add a "synthetic" BSS to the output of iw so I can then use a lookahead in the regex that would also match on the last entry.
So I wonder: Is there a more elegant way to do this?