Say I have a long string of text, and I want to capture everytime the word this is mentioned within rounded brackets. How could I do this? The following pattern only matches the first this, ignoring every occurrence after:
/\(.*(this).*\)/g
For example, using the pattern above on the following text:
Etiam scelerisque, nunc ac egestas consequat, (odio this nibh euismod nulla, eget auctor orci nibh vel this nisi. Aliquam this erat volutpat).
Will only return the first this after the word odio.
What am i doing wrong