Skip to contents

This function extracts a UUID (Universal Unique Identifier) from the filename, using a regular expression that specifically identifies the standard UUID format.

Usage

get_uuid(filename)

Arguments

filename

A character vector containing filenames or strings

Value

A character vector with extracted UUIDs (or NA if none found)

Examples

library(pliman)
file <- "Grãos - contagem_f68bca60-c8cf-4272-9448-3f28891a97cd.jpg"
file2 <- "Grãos - contagem_f68bca60-c8cf-4272-9448-3f8891a97cd.jpg"
get_uuid(file)
#> [1] "f68bca60-c8cf-4272-9448-3f28891a97cd"