I have read up on other questions/answers that get the text between square brackets - but what if I only want to get those brackets with specific text.
For example, the string I have is in the following format:
{this is a}{string with text}{i want this bracket}{only}
I want to extract all of the {i want this bracket}
by searching upon want
and bracket
only. The i
and this
could be random text, example {gjddnsgwantjgnsagjbracket}
I can split them up into groups by doing the following:
/\{(.*?)\}/g
But I cannot for the love of me search within said capture groups to extract the bracket I want.