Learn R Programming

emoji (version 15.0)

emoji_match: Extract matched emojis from a string

Description

Vectorized over string

Usage

emoji_match(string)

emoji_match_all(string)

Value

see stringr::str_match()

Arguments

string

Input vector

See Also

Examples

Run this code
chars <- c(letters[1:4], emoji_name[1:6])

set.seed(1234)

strings <- lapply(1:10, function(x) paste(sample(chars, x), collapse = ""))

extracts <- emoji_match(strings)


extracts <- emoji_match_all(strings)

Run the code above in your browser using DataLab