I'd like to swap two words using capture groups in Vim using only one line of regex, but I cannot find a solution to this for example
word1
word2
expecting:
word2
word1
get:
word1
word2
I've also tried s/(word1)(word2)/\2\1/g
but they don't swap their position or even replace
Is there any way I can achieve this?