Hi,
I am trying to figure out how to remove text from a file while stripping out everything else. I have found similar things online but cannot find just what I need. This is what I need to do with something as shown:
So in the first line where #C starts, I need to strip everything in that line but RE67-0351R1. The items I need to remove will always begin with the same format #C and at the end of the item will always be a semicolon. Thanks for any help!
I am trying to figure out how to remove text from a file while stripping out everything else. I have found similar things online but cannot find just what I need. This is what I need to do with something as shown:
Code:
#R FID4;CE;125;-25.400;12.700
#R FID5;CE;125;-25.400;106.680
#R FID6;CE;125;-218.440;12.700
#A BOARD;0.000;0.000;0.000
#M BOARD
#C RE67-0351R1;R3;90.000;-42.545;87.630
#C CR244-15VE;VR4;270.000;-189.865;66.675
#C CR244-15VE;VR7;90.000;-196.850;73.025
#C CR244-15VE;VR8;90.000;-193.040;73.025
#C RE99-1002F;R26;90.000;-184.785;66.675
#C RE99-1000F;R23;270.000;-180.340;73.152
#C RE99-1001F;R27;270.000;-185.420;71.247
#C RE113-011003J;R59;270.000;-114.300;34.925
#C CA237-06-100JA;C62;270.000;-112.395;38.354
#C RE99-1001F;R62;0.000;-111.125;45.085
#C CA266-102K0501N;C64;0.000;-109.220;43.180
So in the first line where #C starts, I need to strip everything in that line but RE67-0351R1. The items I need to remove will always begin with the same format #C and at the end of the item will always be a semicolon. Thanks for any help!