(For some reason map { s/^[0-9]+:\ ([a-z]+[0-9]*):\ .*$/$1/; } grep ... doesn't seem to work).
That's because s/// returns the number of substitutions, not the substituted string, and map picks up the return value of the block. So adding a $_; to the end of the block might help, then the block returns the substituted text.
In reply to Re^2: Remove text after and before
by moritz
in thread Remove text after and before
by muizelaar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |