Roman Hanousek wrote:
Hi All
I have bunch of files that contain code like this:
What I am trying to do is match <ps:img and this /> then check that this
piece of code contains a alt= tag.
<ps:img page="/images/portal/arrow_down.gif" border="0"
width="9" height="6"
alt="${string['lists.list.sort.ascending.alt']}"
title="${string['lists.list.sort.ascending.alt']}" />
And if it doen't print the lines where it's missing to screen or file.
while($input =~ |<ps:img .+(alt\s*=\s*\".+\")?.+/>|sgc) {
print "Missing ALT\n" if(! defined $1);
}
That doesn't give you line numbers, but it does give you an idea of where to start.
--
Andrew Gaffney
Network Administrator
Skyline Aeronautics, LLC.
636-357-1548
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>