Update: Thanks Athanasius for your appreciation && corrections.my $string = 'abcdefgxxabcdefgzzabcdsjfhkdfab'; my %seen; 1 while $string =~ /(\w{2,}?)(?{$seen{$1}++})(?!)/g; print [sort { $seen{$b} <=> $seen{$a} || length($b) <=> length($a) } keys %seen]->[0];
In reply to Re: RegEx + vs. {1,}
by trizen
in thread RegEx + vs. {1,}
by Sewi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |