How do I extract the "program name" from a string. The string will look like this :
% O0033(SUB RAD MSD 50R III) G91G1X-6.4Z-2.F500 G3I6.4Z-8. G3I6.4 G3R3.2X6.4F500 G91G0Z5. G91G1X-10.4 G3I10.4 G3R5.2X10.4 G90G0Z2. M99 %
The program name is (SUB RAD MSD 50R III). Storing the result in another string is fine. I'm learning powershell so any explaination of your answers will be appreciated.