I modified your existing regex pattern so that it provides the outcome as expected. As you see, it still uses the OR-operator.
The 2nd example is finding words which matches on both conditions "starts with ds
AND after that contains rer
".
library(stringr)
## modified regex pattern with the OR-operator
str_detect(c("como", "como-rer", "cedcomo", "ds-como", "ds+como-rer"), "^como(?-)|(-como)")
#> [1] TRUE TRUE FALSE TRUE FALSE
## different pattern which states: word starts with 'ds' and then contains `rer` somewhere
str_detect(c("como", "como-rer", "cedcomo", "ds-como", "ds+como-rer"), "(^ds).+(rer)")
#> [1] FALSE FALSE FALSE FALSE TRUE
Created on 2021-02-19 by the reprex package (v1.0.0)
Hope this helps you forward.