A step forward (for some definition of forward) could've been
if one really wants to do it the regex way. ;-)local our %counts; $string =~ /(?:^|,)([^,]*)(?:,|\z)(?{ $counts{$1}++ })(?!)/;
lodin
In reply to Re^4: how to count the no of repeats in a string
by lodin
in thread how to count the no of repeats in a string
by koleti
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |