I have a regular expression to search in a string.
new RegExp("\\b"+searchText+"\\b", "i")
My strings:
"You are likely to find [[children]] in [[a school]]"
"[[school]] is for [[learning]]"
How can I search only the words in double brackets?
A regular expression should contain searchText as a function argument.