At 13:44 -0700 22/06/2011, Warren Michelsen wrote:
Why does this code as a Unix filter not delete table column 1?
#!/usr/bin/perl
s/(^<tr>)(<td>.*?<\/td>)(<td>.*?<\/td>)(<td>.*?<\/td>)(<\/tr>)/\1\3\4<\/tr>/;
print;
Instead, all selected text is replaced with nothing. What about this
script is malformed?
It has nothing to print, so it prints nothing.
#!/usr/bin/perl
while(<>){
s/(^<tr>)(<td>.*?<\/td>)(<td>.*?<\/td>)(<td>.*?<\/td>)(<\/tr>)/\1\3\4<\/tr>/;
print;
}
JD
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>