in reply to Re: Remove text after and before
in thread Remove text after and before

(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.