I would like to select a word after brackets using RegEx and JS:

I have a dictionary of tags:

`Tags= ['Tag1', 'Tag2', 'Tag3', 'Tag4', 'Tag5']`

I have a database request that provides me with a string. I need to pick certain values from the string using Regex with the following conditions:

1. I would like to pick the words (including ä,ë,ü,ö) that come immediately after [X] (the letter X between brackets), but NOT the words that come after:

	* [UnRelatedTag][X]sunset[Y]beach[Tag1][UnrelatedTag]a[UnrelatedTag][UnrelatedTag][UnrelatedTag]
		+ Expected output: sunset
2. I would like to pick the word OR the words (including ä,ë,ü,ö) that come after one of the tags in my dictionary variable, even if there are other brackets in between:

* [UnRelatedTag][X]sunset[Y]beach[Tag1][UnrelatedTag]a[UnrelatedTag][UnrelatedTag][UnrelatedTag]
-- Expected output: a
* [UnRelatedTag][X]sunset[Y]beach[Tag1][UnrelatedTag]paintball[UnrelatedTag][UnrelatedTag][UnrelatedTag]
-- Expected output: paintball
* [UnRelatedTag][X]sunset[Y]beach[Tag1][UnrelatedTag]paintball[UnrelatedTag][UnrelatedTag][UnrelatedTag]yacht
-- Expected output: paintball, yacht.
* [UnRelatedTag][X]sunset[Y]beach[Tag1]snowball
-- Expected output: snowball.

3. The final result is to be used in JS, to concat the word after [X] and the single/multiple words after [Tag] into one string.

Thank you for your help