My input is:

```
'<div><strong>test</strong><div><strong>kkk</strong></div><div><strong>111</strong></div></div>'

```

And the output needs to be:

```
'<div><strong>test</strong><div><strong>kkk</strong></div><div>111</div></div>'

```

(`<strong>` tag unwrapped from `111`)

Here is what I have so far:

```js
var input = '<div><strong>test</strong><div><strong>kkk</strong></div><div><strong>111</strong></div></div>';

var effect = 'strong',  // dynamic
    selectedText = '111';  // dynamic

var regex = new RegExp('<' + effect + '>.*' + selectedText + '.*<\/' + effect + '>');

if(regex.test(input)){
    console.log('replacing');
    input = input.replace(regex, selectedText);
}

console.log(input);
```

For some reason, it is giving me the output as: `<div>111</div></div>`

How do I fix this?