Inspired by stringr::str_extract_all(), but with ignore case option.

s_extract_all(txt, pattern, IC = TRUE, unl = FALSE)

Examples

"bla bla bla Foo ble ble" |> s_extract_all("foo")
#> [[1]]
#> [1] "Foo"
#> 
c("bla bla bla Foo ble", "Lorem FOO ipsum") |> s_extract_all("foo", unl = T)
#> [1] "Foo" "FOO"