1998bmwz3
05-17-2005, 07:44 PM
Hello All:
I am modifying contents of a txt file that looks something like this:
c1U5 := c1G(011001100110011001100110011001100110011001100110
1001100110011001100110011001100110011001100110011001100110
1100110011001100110011001100110011001100110011001100110011
What I want to do is replace all the 1's after the "(" with 0's.
The global substitution
s/1/0/g;
does not work because the "c1U5" & "c1G" in line 1 get modified to "c0U5" & "c0G".
So essentially what I want to do is walk along the string till I see "(", and then start replacing all the following 1's by 0's.
Please let me know the best way of doing this.
Appreciate your time!!
I am modifying contents of a txt file that looks something like this:
c1U5 := c1G(011001100110011001100110011001100110011001100110
1001100110011001100110011001100110011001100110011001100110
1100110011001100110011001100110011001100110011001100110011
What I want to do is replace all the 1's after the "(" with 0's.
The global substitution
s/1/0/g;
does not work because the "c1U5" & "c1G" in line 1 get modified to "c0U5" & "c0G".
So essentially what I want to do is walk along the string till I see "(", and then start replacing all the following 1's by 0's.
Please let me know the best way of doing this.
Appreciate your time!!