Anotherone I'm not getting to work: From some output with
newlines I want to discard all lines, that start with a # and
select part of the other lines with a regex. (I know the regex
r".*" is quite useless, but it will be replaced by something more
usefull.)
I tried the following, but non worked:
output.split("\n").filter!(a=>a.length>0 &&
a[0]!='#').matchFirst(r".*");
output.split("\n").filter!(a=>a.length>0 &&
a[0]!='#').array.matchFirst(r".*");
output.split("\n").filter!(a=>a.length>0 &&
a[0]!='#').array.map!(matchFirst(r".*"));
output.split("\n").filter!(a=>a.length>0 &&
a[0]!='#').array.map!(a=>matchFirst(a,r".*"));
Any ideas?