I have the following R script in a java String variable (including new line characters):
d = 1
for (i in 1:150 ) {
d = d + i;
}
print(d)
What I'm looking for is to obtain the R functions, regardless of new lines.
Following the previous example, I would get an array of three strings:
first: d = 1
second: for (i in 1:150 ) {
d = d + i;
}
third: print(d)
is this possible with Regex?