I have the following strings:

```
x  <- "??????????DRHRTRHLAK??????????"
x2 <- "????????????????????TRCYHIDPHH"
x3 <- "FKDHKHIDVK????????????????????TRCYHIDPHH"
x4 <- "FKDHKHIDVK????????????????????"

```

What I want to do is to replace all the `?` characters with
another string

```
rep <- "ndqeegillkkkkfpssyvv"

```

Resulting in:

```
ndqeegillkDRHRTRHLAKkkkfpssyvv           # x
ndqeegillkkkkfpssyvvTRCYHIDPHH           # x2
FKDHKHIDVKndqeegillkkkkfpssyvvTRCYHIDPHH # x3
FKDHKHIDVKndqeegillkkkkfpssyvv           # x4

```

Basically, keeping the order of `rep` in the replacement with the interleaving characters `DRHRTRHLAK` in `x`.

The total length of `rep` is the same as the total length of `?`, 20 characters.

Note that I don't want to split `rep` manually again as an extra step.

I tried this but failed:

```
>gsub(pattern = "\\?+", replacement = rep, x = x)
[1] "ndqeegillkkkkfpssyvvDRHRTRHLAKndqeegillkkkkfpssyvv"

```