string matrix to 2D array

I am a very beginner and i need a function the would convert a string that the used enters in the form
[2 -3;5 6.11;7 8]
for example into a matrix , can anyone help me with this .. i just can't figure out how i should fill the 2D array and print out ERROR in case the user enters an unexpected character or a missing entry ??
Topic archived. No new replies allowed.