#' brmsMethod: get_matches
#' @export
get_matches <- function (pattern, text, simplify = TRUE, first = FALSE){
x <- regmatches(text, gregexpr(pattern, text))
if (first) {
x <- lapply(x, function(t) if (length(t))
t[1]
else t)
}
if (simplify) {
if (first) {
x <- lapply(x, function(t) if (length(t))
t
else "")
}
x <- unlist(x)
}
x
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.