Home / Expert Answers / Computer Science / find-the-nine-state-names-with-one-or-more-occurrences-of-in-followed-by-a-letter-for-those-s-pa351

(Solved): Find the nine state names with one or more occurrences of in followed by a letter. For those s ...



Find the nine state names with one or more occurrences of “in” followed by a letter. For those states, select two different ways to replace the “in” with “xx” followed by the original following letter. Use Groups and then use a Look Around. state.name[stringr::str_detect(state.name, "in.")] |> stringr::str_replace_all("in[:alpha:]", "xx\\1") stringr::str_subset(state.name, "in.") |> stringr::str_replace_all("in(.)", "xx\\1") stringr::str_subset(state.name, "in.") |> stringr::str_replace_all("in(?=.)", "xx")



We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe