I have a text file with several lines in the following format:
gatename #outputs #inputs list_of_inputs_separated_by_spaces * gate_id
example:
nand 3 2 10 11 * G0 (The two inputs to the nand gate are 10 and 11)
or 2 1 10 * G1 (The only input to the or gate is gate 10)
What I need to do is rename the contents such that I eliminate the #outputs column so that the end result is:
gatename #outputs list_of_inputs_separated_by_spaces * gate_id
nand 2 10 11 * G0
or 1 10 * G1
I tried using the find and replace function of Eclipse (the find parameter was a regex statement that didn't work), but it ended up messing up the gatename. I am considering using a Python script and iterating over each line of the text file. what I need help with is determining what the appropriate regex statement is.