I have a string "BTL_OTM_TLS_TTL_ACQ_0.0.0|Fixed" from where I want to extract "BTL_OTM_TLS_TTL_ACQ".
However I am getting "BTL_OTM_TLS_TTL_ACQ" "|". I have used stringr and I have provided the code below. Any help will be greatly appreciated.
> k
[1] "BTL_OTM_TLS_TTL_ACQ_0.0.0|Fixed"
> str_extract(k, "(_)[0-9](.)+")
[1] "_0.0.0|Fixed"
> strsplit(as.character(k),str_extract(as.character(k),"(_)[0-9](.)+"))
[[1]]
[1] "BTL_OTM_TLS_TTL_ACQ" "|"