Thanks for these suggestions. However I have one more question. Is there any way to extract only numbers? For example I want to extract only "88" in my example.
Regards, MUHC-Research wrote: > > Hi Ron, > > Look up the grep() function. > > Cheers, > > -- > *Luc Villandré* > /Biostatistician > McGill University Health Center - > Montreal Children's Hospital Research Institute/ > > RON70 wrote: >> Hi all, is there any function to find some words in a character-string? >> For >> example suppose the string is : "gdfsa-sdhchc-88", now I want to find >> whether this string contains "sdhch". Is there any R function to do that? >> >> Regards, >> > // > > ______________________________________________ > 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. > > -- View this message in context: http://www.nabble.com/Searching-within-a-ch.-string-tp23484010p23535406.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.