Read file (Extract string by spacing)

I read through the guide but i still can't figure out how to extract a string separated by spacing from a file .

Eg txt file:

Line No: G-code: X-coordinate: Y-coordinate:

N00002 G00 X0009.500 Y0005.000;
N00003 G03 X0002.500 Y0005.000 I-0003.500 J0000.000;
N00004 G03 X0009.500 Y0005.000 I0003.500 J0000.000;


How can i extract string like G00 and G03 which are separated by a spacing? I wish to extract string which are separated by spacing.
Topic archived. No new replies allowed.