singe batteur singe batteur - 2 months ago 8x
YAML Question

how to invert keys and values in a YAML file (key : value)

I have a big

translation file, in which I would like to invert the keys and the values.

what I have :

some english sentence : une phrase en francais
another one : une autre

what I would like to get :

une phrase en francais : some english sentence
une autre : another one

I'm sure there might be a bunch of easy regex to do so, but I could not figure out how to do this ...

I dont search a script, just a regex


The regex:


The substitution:

$2 : $1