Now the line looks like this:
"Interest.USD,Vol=[Integrated,(0,0.101),(0.2,0.108),(1,0.110),(2,0.106),
(3,0.102),(4,0.09),(5,0.091),(6,0.09128272)],Drift=[Integrated,(0.002,0.09),
(0.24,0.0007),(0.4,0.007),(1,-0.033),(2,-0.005),(3,-0.0041),
(4,-0.3505),(5,-0.65),(7,-0.08346),(8,-0.049),(9,-0.0613),(10,-0.019)],
Risk_Neutral=YES,Lambda=0.09,FX_Volatility=0.01,FX_Correlation=0.9"
I want to capture data following βVolβ and βDriftβ in matrix format, for example:
Matrix Vol:
0,0.101
0.2,0.108
1,0.110
2,0.106
3,0.102
4,0.09
5,0.091
6,0.09128272
as well as one value equal to 0.09 for Lambda. I think I shuold to use regex, but I do not know what about this. Any suggestion?:)
PS I tried to use:
str_extract_all(text,'[ .+? ]')
try to get bewteen [and] data, but it returns ".".