Hogwarts Email Sorting
Given a list of emails, get the students full name and their associated house.
Start file
james.potter@gryffindor.hogwarts.edu sirius.black@gryffindor.hogwarts.edu lily.potter@gryffindor.hogwarts.edu draco.malfoy@slytherin.hogwarts.edu harry.potter@gryffindor.hogwarts.edu susan.bones@hufflepuff.hogwarts.edu luna.lovegood@ravenclaw.hogwarts.edu pansy.parkinson@slytherin.hogwarts.edu cedric.diggory@hufflepuff.hogwarts.edu cho.chang@hufflepuff.hogwarts.edu
End file
James Potter Gryffindor Sirius Black Gryffindor Lily Potter Gryffindor Draco Malfoy Slytherin Harry Potter Gryffindor Susan Bones Hufflepuff Luna Lovegood Ravenclaw Pansy Parkinson Slytherin Cedric Diggory Hufflepuff Cho Chang Hufflepuff
View Diff
1,10c1,10 < james.potter@gryffindor.hogwarts.edu < sirius.black@gryffindor.hogwarts.edu < lily.potter@gryffindor.hogwarts.edu < draco.malfoy@slytherin.hogwarts.edu < harry.potter@gryffindor.hogwarts.edu < susan.bones@hufflepuff.hogwarts.edu < luna.lovegood@ravenclaw.hogwarts.edu < pansy.parkinson@slytherin.hogwarts.edu < cedric.diggory@hufflepuff.hogwarts.edu < cho.chang@hufflepuff.hogwarts.edu --- > James Potter Gryffindor > Sirius Black Gryffindor > Lily Potter Gryffindor > Draco Malfoy Slytherin > Harry Potter Gryffindor > Susan Bones Hufflepuff > Luna Lovegood Ravenclaw > Pansy Parkinson Slytherin > Cedric Diggory Hufflepuff > Cho Chang Hufflepuff
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock 258 remaining solutions by signing in and submitting your own entry
#259 Christophe Kafrouni / @KafrouniChris - Score: 590 - 04/29/20 @ 16:06
:%s<CR>:%s/\([<50-53>vimgolf put 5e2786a9ee9d370009f72c0a<Esc>[201~<BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><50-53>[a-z]*\<Esc>[201~<BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><50-53>:%s/\([a-z]*\)[.]\([a-z]*\)[@]\([a-z]*\).*/\u\1 \u\2 \u\3/g<CR>:wq!<CR><Esc>[201~uuuu<50-53>:%s/\([a-z]*\)[.]\([a-z]*\)[@]\([a-z]*\).*/\u\1 \u\2 \u\3/g<CR>:wq!<CR><Esc>[201~<50-53>:%s/\([a-z]*\)[.]\([a-z]*\)[@]\([a-z]*\).*/\u\1 \u\2 \u\3/g<CR>:wq!<CR><Esc>[201~uuuu:<50-53>:%s/\([a-z]*\)[.]\([a-z]*\)[@]\([a-z]*\).*/\u\1 \u\2 \u\3/g<CR>:wq!<CR><Esc>[201~<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><CR>:<50-53>%s/\([a-z]*\)[.]\([a-z]*\)[@]\([a-z]*\).*/\u\1 \u\2 \u\3/g<Esc>[201~<CR>:<50-53>:wq<Esc>[201~<CR>
0 comments