I'm trying to replace text inside of parenthases with the same text surrounded by <span class="bold">my text between parenthases</span>
text.replace(/\[([^\][]+)]/g, "<span class='font-weight-bold underline'>$1</span>")
so If I have this is my [name]
It replaces it to this is my <span class="bold">name</span>
I need something similar for parentheses.
How can I replace text globally between parentheses? It's not a simple as I thought it would be.