fork download
A <- c("Hello world", "Green 44", "Hot Beer", "Bip 6t")
sub("([[:alpha:]]+)", "*\\1*", A)
## => "*Hello* world" "*Green* 44"    "*Hot* Beer"    "*Bip* 6t"     

library(stringr)
stringr::str_replace(A, "([[:alpha:]]+)", "*\\1*")
stringr::str_replace(A, "(\\p{L}+)", "*\\1*")
Success #stdin #stdout 0.29s 42500KB
stdin
Standard input is empty
stdout
[1] "*Hello* world" "*Green* 44"    "*Hot* Beer"    "*Bip* 6t"     
[1] "*Hello* world" "*Green* 44"    "*Hot* Beer"    "*Bip* 6t"     
[1] "*Hello* world" "*Green* 44"    "*Hot* Beer"    "*Bip* 6t"