Im just beginner in Swift Development. I don't know how to remove the .isSelected when the user choose the other button
['https://Stackoverflow.com/questions/68377604', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/15285622/']
Looking at the pattern that you tried, you could match using a capture group for the part after the first curly.

```
\{(\{.*?}})

```

And replace with

```
{&#8203;$1

```

See a [regex demo](https://regex101.com/r/XJ9wdP/1) and a [Java demo](https://ideone.com/tdRXau)

Example code

```
String regex = "\\{(\\{.*?\\}\\})";
String string = "{{ interface_ID }} THERE SHOU{{interface_ID}}LD BE CODE HERE: {{interface_ID}}";

Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(string);

System.out.println(matcher.replaceAll("{&#8203;$1"));

```

Output

```
{&#8203;{ interface_ID }} THERE SHOU{&#8203;{interface_ID}}LD BE CODE HERE: {&#8203;{interface_ID}}

```
```
Pattern CURLY_BRACKETS_PLACEHOLDER = Pattern.compile("\\{\\{(.*?)\\}\\}");
Matcher m = CURLY_BRACKETS_PLACEHOLDER.matcher(htmlString);
while(m.find()) {
        String script = m.group(1);
        String scriptWithPlaceholder = "{{"+script+"}}";
        String replacementToken = "{"+ ZERO_WIDTH_SPACE_CHARACTER +"{"+script+"}}";
        htmlString = htmlString.replace(scriptWithPlaceholder, replacementToken);
}
return htmlString;

```