On Thu, 2003-02-27 at 15:37, pll at lanminds.com wrote: > But when I do something like > > $foo = s/.*((([0-9A-F]{2}):){5}$1).*/$1/g ; > print "$foo\n"; I think you're forgetting to match that last piece there.. how about this: s/.*((([0-9A-F]{2}):){5}[0-9A-F]{2}$1).*/$1/g;