I need to extract some information from a string.
Here is an example dataset
data <- data.frame(id = c(1,2),
text = c("GK_Conciencia fonologica (FSS)_Form_Number_1.csv",
"G1_Conciencia fonologica (FSL)_Form_Number_3.csv"))
> data
id text
1 1 GK_Conciencia fonologica (FSS)_Form_Number_1.csv
2 2 G1_Conciencia fonologica (FSL)_Form_Number_3.csv
Basically, I need extract the text inside of the paranthesis and numerical value after Form_Number
.
How can I get the desired information below.
id text cat form
1 1 GK_Conciencia fonologica (FSS)_Form_Number_1.csv. FSS. 1
2 2 G1_Conciencia fonologica (FSL)_Form_Number_3.csv. FSl. 3