Skip to main content
3 of 4
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/

#GNU Sed, 33

Score includes +2 for -rn options to sed.

This is almost a direct port of @FryAmTheEggman's Retina answer:

:
s/(\w)(.*,.*)\1/\2/i
t
/\w/Q1

Ideone.

Digital Trauma
  • 73k
  • 9
  • 112
  • 264