# NOT RUN {
x <- as_text(c("A man, a plan.", "A \"canal\"?", "Panama!"),
filter = text_filter(drop_punct = TRUE))
# entire text
text_sub(x, 1, -1)
# first three elements
text_sub(x, 1, 3)
# last two elements
text_sub(x, -2, -1)
# }
Run the code above in your browser using DataLab