Skip to content

Instantly share code, notes, and snippets.

@rektide
Last active December 24, 2015 22:29
Show Gist options
  • Save rektide/6873677 to your computer and use it in GitHub Desktop.
Save rektide/6873677 to your computer and use it in GitHub Desktop.
Conjoin matchinglines
input:
["15:19",
"< rektide>",
....
....
....
....],
["15:20",
"< rektide>",
....
....
....],
output:
["15:19", "< rektide>",
....
....
....
....],
["15:20", "< rektide>",
....
....
...],
guesswork at a means:
:s/^\[(.*?),\r(.*?)\r/[$1, $2/gn 10000
description of guesswork's selection and dump:
select:
beginning of a line, look for a [, the rest of the line, a comma, a newline, the next line.
two lines, any starting with [ ends with , and the one that follows
dump:
one line with both of the previous lines joined together.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment