I have the following sequence:
my_seq <- "----?????-----?V?D????-------???IL??A?---"
What I want to do is to detect range of positions of non-dashed characters.
----?????-----?V?D????-------???IL??A?---
| | | | | | |
1 5 9 15 22 30 38
The final output will be a vector of strings:
out <- c("5-9", "15-22", "30-38")
How can I achieve that with R?