# NOT RUN {
unglue_sub(
c("a and b", "foo or bar"),
c("{x} and {y}", "{x} or {z}"),
"XXX")
unglue_sub(
c("a and b", "foo or bar"),
c("{x} and {y}", "{x} or {z}"),
toupper)
unglue_sub(
c("a and b", "foo or BAR"),
c("{x} and {y}", "{x} or {z}"),
list(x= "XXX", y = toupper, z = tolower))
# }
Run the code above in your browser using DataLab