x <- "I know <U+0001F621<U+0001F923>"regmatches(x, gregexpr("<\\K[^<>]+", x, perl=TRUE))
Standard input is empty
[[1]] [1] "U+0001F621" "U+0001F923"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!