I am trying to replace :: and ;; to
const text = 'Welcome :: my ;;'.replace('::', <Strong>to</Strong>).replace(';;', <Strong>world</Strong>);
I am getting this
Welcome [object Object] my [object Object].
Expected response Welcome **to** my **world**.
Can anyone please help me on that.
Updated question
There will be random text like this:
Welcome :: my ;;Welcome ;; my ::Hello ::
And replace :: with dynamic value suppose to only and ;; with dynamic value world only.