(mytext <- c("#710=[#706+#701](First groove bottom)",
"#711=[#706+#707](Second Groove Bottom)",
"#717=[#702+#716](Compensated tool diameter)",
"#712=[[#708-#717]/2](Diameter of tool path)",
"#713=[#712/2](Radius of tool path)",
"#714=[#704*1.5]",
"#715=[#703*2]"))
(mytext2 <- regmatches(mytext,
regexpr(pattern ="\\[(.*?)\\]",
text = mytext) ))