Last active
December 24, 2015 22:29
-
-
Save rektide/6873677 to your computer and use it in GitHub Desktop.
Conjoin matchinglines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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