I have used Regex to extract the content inside square brackets :-
string.match(/[^[\]]+(?=])/g)
but this does not extract the string between square brackets such as
string= "[Description of project (only for)]"
also what will be the regex to remove the html elements inside the square brackets
example :-
string="[<span>Description of project (only for)</span>]"
output after apllying regex should be "Description of project(only for)"