Hello,
i have the following problem.
Say a file has the following 2 lines
<img src="spacer.gif" blablabla alt=""><img src="spacer.gif" someMoreGarbage>
<img src="spacer.gif" blablabla><img src="spacer.gif" someMoreGarbage>
how do i search for the lines which DO NOT have the "alt" attribute following the "spacer.gif"?
Now, i know this is called "zero-width negative look-ahead assertion" in Perl, but i can't seem to get it to work in Perl do to the greedy and non-greedy operators not really functioning in the way i expect.
Is there any way of doing this with SED or grep (or its variants)?
Any help would be great!
i have the following problem.
Say a file has the following 2 lines
<img src="spacer.gif" blablabla alt=""><img src="spacer.gif" someMoreGarbage>
<img src="spacer.gif" blablabla><img src="spacer.gif" someMoreGarbage>
how do i search for the lines which DO NOT have the "alt" attribute following the "spacer.gif"?
Now, i know this is called "zero-width negative look-ahead assertion" in Perl, but i can't seem to get it to work in Perl do to the greedy and non-greedy operators not really functioning in the way i expect.
Is there any way of doing this with SED or grep (or its variants)?
Any help would be great!