Thanks! That works like a charm, but I am not sure if I fully understand the syntax. I looked at the gsub page but still couldn't figure it out. What does the pattern part (",{0,1} Inc[.]{0,1}") do? What do the 0 and 1 within the curly brackets refer to? Also, what if, for example, I would want to remove the word "Energy"?
Thank you very much in advance. Math -- View this message in context: http://r.789695.n4.nabble.com/gsub-strsplit-with-multiple-patterns-splits-tp4631873p4631897.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.