I would like to remove all the words inside square brackets as well as the brackets themselves. For example,
text = c('[Verse 1]', '[Verse 1: Dua Lipa]', '[Corus]', '[Corus: Ann Marie & Ed Sheeran]')
Like above, the length of words inside the bracket are not constant. So I need a function that can identify the position of [
and ]
in order to erase all the words, numbers and symbols in between. Is there any function able to do that?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…