unnest_tokens()
gutenbergr
sentiments
bind_tf_idf()
bind_log_odds()
ggraph
widyr
augment()
*
*?
+
+?
{n, }
{n, }?
A common use case of lazy quantifiers is when we need to strip from html form text all its tags:
text <- "This offer is not available to customers living in <B>AK</B> and <B>HI</B>" # lazy str_extract_all(text, "<[Bb]>.+?</[Bb]>") #> [[1]] #> [1] "<B>AK</B>" "<B>HI</B>" # greedy str_extract_all(text, "<[Bb]>.+</[Bb]>") #> [[1]] #> [1] "<B>AK</B> and <B>HI</B>"