You can use a JSON library to parse the output (which is in JSON format) and then pull out the parts that you want. Or you can directly modify the source code for the RPC to only give you the info that you want.
Thanks for the speedy reply.
JSON is out of the question for this project and i have tried various commands such as getnethash etc etc but none work