Trying to form a regular expression to match the pattern of keywords, the pattern I found is like
- remove all words before
:till a space occurs and all words after:till)occurs.
find the term in this jsfiddle.
var newInput="keyword2:(content2) app keyword1:(content1) sos keyword:(content) das sad";
Im looking for an output like
app,sos,das,sad