RB
rb
1
2
3
4
5
6
7
8
9
10
11
12
# https://www.sololearn.com/Discuss/994796/challenge-split-string-when-character-changes
s="AaaabbbbYY@---..aaaa 555%%%%(((f)))"
p=""
s.each_char do |c|
if c != p
print "\n"
p = c
end
print c
end
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run