Re: OT regex help

2002-11-20 Thread Mark Ivey
perl -ne '/\A(.).*(.)\Z/; print $1, $2;' test would do it as long as you stick to a single line... -Mark Ivey- On Wed, 2002-11-20 at 13:56, Matthew Boeckman wrote: > I know this is a little OT, but thought someone might have a quick > answer. I'm trying to match the first and or last letter in

OT regex help

2002-11-20 Thread Matthew Boeckman
I know this is a little OT, but thought someone might have a quick answer. I'm trying to match the first and or last letter in a single word textfile. So, assume a file called test, with the contents: abcdef . What I'm after is the return af . I thought that grep -G \<\> test would do it, but