What is the best way in Java for doing the following replacement on Strings:
I have text that looks similar to this:
one two [[**my_word** other words]] three four [[**my_other_word** other words]] five six
and I want the following text
one two **my_word** three four **my_other_word** five six
I tried using regex capture groups but how can I replace one capture group with another one?