I want to create an array of the texts inside brackets fom right to left. So if we have this text:
const text = "I was sent [to earth] for the [next time]"
Then the desired result would be:
["next time", "to earth"]
So far I just find the regex to select the inside of the bracket:
This is the prototype (not the code I'm looking for):
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…