#!/usr/bin/perl # # pattern match testing # use warnings; use strict; # use re 'debug'; my $str = 'triple hybrid: dehyd: triple hybrid: dehydrofolate reductase reconstruction ;MI:0111'; $str =~ s/(.+): \1/$1/; print "'$1'\n$str\n";