Q:

regex help splitting string on the hyphen and space characters in R

I have a string as follows:
"IPF-Plasma 1"

I'd like to split on "-" and "\\s". I tried the following:
strsplit(cleanData[[1]][1,1], "-|s")

However, it gives, 
    > strsplit(cleanData[[1]][1,1], "-|s")
[[1]]
[1] "IPF"  "Pla"  "ma 1"

Why is there a split on "Plasma"? And how would I fix it?

A:

You had it... you forgot the slashes...
a <- "IPF-Plasma 1"
> strsplit(a, "-|s")
[[1]]
[1] "IPF"  "Pla"  "ma 1"

> strsplit(a, "-|\\s")
[[1]]
[1] "IPF"    "Plasma" "1"     

