in reply to Graph File Parsing
And another one for the edges.while($nodepart =~ m/node\s* \{\s* title:\s* "([^"]*)"\s* loc\s* \{\s* x:\s* (\d+)\s* y:\s* (\d+)\s* \}\s* \}\s*/gx){ build_the_structure_with_captured_node($1,$2,$3); }
Most of languages have some regexp library - so this can work.
Update: The s modifier was not needed - \s matches a newline without it.
|
|---|