my @chars = grep 0==(++$seen{$_})%2, /./sg;
For example,
$ perl -E'say for grep 0==(++$seen{$_})%2, "abccabbcabc" =~ /./sg;' c a b b c
In reply to Re: Regex to only show 2nd character of the same character in a string
by ikegami
in thread Regex to only show 2nd character of the same character in a string
by wtritchie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |