Greetings;

I have a file of 100+ records like the following. I hope the line wrap doesn't mess things up too much.

<a href="http://www.ten.com/"; target="_blank">|<img src="/022.jpg" border="0"></a>| ,<a href="http://www.ten.com/"; 
target="_blank"><font size="1">|Link Text Message|</font></a>
<---------------------($1)------------------->|<-------------($2)---------------->|<---------------------------------($3)------------------------>|<------($4)----->|<<trash>>>>

I have inserted | where I want to split them and indicated by <--($n)--> below the record what var I think they will go to.

I want to reformat them as $1$4$2 so they look like this:

<a href="http://www.ten.com/"; target="_blank">Link Text Message<img src="/022.jpg" border="0"></a>

I am having no luck at all. Here is my last attempt, which produces no change at all!!

perl -i -p -e 's/^([^<img]+)(<img.+\/a> )(,.+1\">)(.+<)/$1$4$2/' FHG.tst

Obviously I am getting further away so no need to try and correct the above.

Any help will be greatly appreciated!

Many TIA!!
Dennis

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to