Skip to content
Prev 336698 / 398513 Next

Extracting everything between two symbols in a string

Hello,

Try the following.

x <- "Braund, Mr. Owen Harris"
sub("^.*, (M[[:alpha:]]*)\\..*$", "\\1", x)


Hope this helps,

Rui Barradas

Em 16-02-2014 12:50, Gianluca Rossi escreveu: