in reply to Extract the variable
But still, on this "regular irregular patterns", splitting on spaces (or other possible delimiters) still wins over regex in my toolbag.$ perl -wle '$_=shift; /\S+\s+(\S+)/ and print $1' ".declare cube_no + 9999999.999" cube_no
$ perl -wle '$_=shift; print +(split)[1]' ".declare cube_no 999 +9999.999" cube_no
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
|
|---|