Skip to content
Prev 179943 / 398502 Next

Searching within a ch. string

The following is TRUE if the indicated string is found:

regexpr("sdhch", "gdfsa-sdhchc-88") > 0

See ?regexpr

Either of the next two will break up a string into words. The
first needs to know the delimiters whereas the second
needs to know the contents:
[1] "gdfsa"  "sdhchc" "88"
[1] "gdfsa"  "sdhchc" "88"

See ?strplit and ?regex and also the gsubfn home page at:
http://gsubfn.googlecode.com
where you can find info on strapply and also further resources
on regular expressions.
On Mon, May 11, 2009 at 10:07 AM, RON70 <ron_michael70 at yahoo.com> wrote: