## Perl, 27 bytes say grep{chop$_ ne$_}/../g Byte added for the `-n` flag. /../g match groups of two chars grep{ } select/filter on... chop$_ remove the last character, mutating the string ne$_ is it different than the remaining character? say output if so Test: llama@llama:~$ perl -nE 'say grep{chop$_ ne$_}/../g' 1110 1 11000110 01 1100011 0 00 1 1101001 0 1011101010 1111