file program issue

digraph _OP_control_flow {
graph [center=true,
epsilon=".000001",
pack=true,
rankdir=LR,
ratio=compress,
sep=".5",
size=“5.83,8.27”,
splines=true
];
node [fillcolor="#fff9f9",
shape=doublecircle,
style=filled
];
B02 [fillcolor="#fff3f3",
shape=circle];
B01 -> B02;
B03 [shape=circle];
B02 -> B03;
B04 [shape=circle];
B03 -> B04;
B05 [fillcolor="#ffecec",
shape=circle];
B04 -> B05;
B06 [shape=circle];
B05 -> B06;
B07 [fillcolor="#ffe6e6",
shape=circle];
B06 -> B07;
B08 [shape=circle];
B07 -> B08;
B09 [fillcolor="#ffecec",
shape=circle];
B08 -> B09;
B10 [shape=circle];
B09 -> B10;
B11 [fillcolor="#ffa0a0",
shape=circle];
B10 -> B11;
B12 [fillcolor="#ffe0e0",
shape=circle];
B11 -> B12 [label="{5}"];
B14 [fillcolor="#ffa0a0",
shape=circle];
B11 -> B14 [label="{4}"];
B13 [fillcolor="#ffc0c0",
shape=circle];
B12 -> B13 [label="{5}"];
B13 -> B14 [label="{5}"];
B15 [fillcolor="#ffe6e6",
shape=circle];
B14 -> B15;
B16 [fillcolor="#ffcccc",
shape=circle];
B15 -> B16;
B17 [fillcolor="#ff4d4d",
shape=circle];
B16 -> B17 [label="{4}"];
B21 [fillcolor="#ffcccc",
shape=circle];
B16 -> B21 [label="{3}"];
B18 [fillcolor="#ff0000",
shape=circle];
B17 -> B18 [label="{10}"];
B19 [fillcolor="#ffc0c0",
shape=circle];
B17 -> B19 [label="{10}"];
B17 -> B21 [label="{4}"];
B18 -> B19 [label="{4}"];
B20 [fillcolor="#ffb3b3",
shape=circle];
B18 -> B20 [label="{6}"];
B20 -> B19 [label="{6}"];
B22 [shape=circle];
B21 -> B22;
B23 [shape=circle];
B22 -> B23;
B24 [fillcolor="#ffecec",
shape=circle];
B23 -> B24;
B25 [fillcolor="#fff3f3",
shape=circle];
B24 -> B25;
B26 [fillcolor="#ff8080",
shape=circle];
B25 -> B26;
B27 [fillcolor="#ffc0c0",
shape=circle];
B26 -> B27 [label="{5}"];
B29 [fillcolor="#ffc0c0",
shape=circle];
B26 -> B29 [label="{4}"];
B28 [fillcolor="#ffe0e0",
shape=circle];
B27 -> B28 [label="{5}"];
B28 -> B29 [label="{5}"];
B30 [shape=circle];
B29 -> B30;
B31 [fillcolor="#fff3f3",
shape=circle];
B30 -> B31;
B32 [shape=circle];
B31 -> B32;
B32 -> B33;
}

c program that will read whole file and where in that file this symbol i.e -> appears, concantenate the string before and after that symbol and save it in an array

for eg save it as B01->B02 …