how do i parse this string in R so that it will look like the following? I'm trying to do this through regular expression through gsub(), but not getting any luck
Input:
"dag{D<-{G}; A<-{D}; A<-{G}; A<-{Q}}"
Output:
"D<-G;A<-D;A<-G;A<-Q"
I've tried:
gsub("dag{(.*)}","","dag{D<-{G}; A<-{D}; A<-{G}; A<-{Q}}")

