Arduino disecting a string
How can I remove everything except for what is in the brackets from the string?


There are a number of String class member functions that can help with this. First, indexOf(val) will help locate the character of interest. Second, substring() will help cut out the part you want. And as a bonus, using lastIndexOf() will allow brackets within the string.  

String s = "println('hello world')";
s = s.substring(s.indexOf('(') + 1);
s = s.substring(0, s.lastIndexOf(')'));


Cheers!