word:12335 anotherword:2323434 totallydifferentword/455 word/32
我需要前抢字符串:或/仅使用基础R功能.我可以使用stringr但不想在我的包中添加另一个依赖项.单词可以具有可变数量的字符,但总是以(一个)分隔符结束.我不需要保留之后的内容.
:
/
stringr
regex r
r ×1
regex ×1