Skip to content

Instantly share code, notes, and snippets.

@outsinre
Created February 26, 2016 15:26
Show Gist options
  • Save outsinre/ba58d9d71533243cb4e6 to your computer and use it in GitHub Desktop.
Save outsinre/ba58d9d71533243cb4e6 to your computer and use it in GitHub Desktop.

I want to merge lines that share common prefix. Example:

a 1
a 2
bc-de 3 4
bc-de 5

After merging:

a 1 2
bc-de 3 4 5

The prefix is a string with hypens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment