Skip to content
Prev 227538 / 398500 Next

question about string handling....

Hi, 

I have a data.frame as following:
var1         var2
1           ab_c_(ok)
2           okf789(db)_c
3           jojfiod(90).gt
4           "ij"_(78)__op
5           (iojfodjfo)_ab

what I want is to create a new variable called "var3". the value of var3 is
the content in the Parentheses. so var3 would be:
var3
ok
db
90
78
iojfodjfo

how to do this?

thanks,

karena