Replace xxx with yyy from a *.txt file

October 12, 2011 at 06:11:44
Specs: Windows XP
Is there any way to do this?

I have a HTML code - (img src="/images/test.gif" alt="XXX - blah blah XXX"><br /)

I have names.txt containing a list of names to replace XXX:
Name1
Name2
etc.

Is there anyway I can get an output from this like:
(img src="/images/test.gif" alt="Name1 - blah blah Name1"><br /)
(img src="/images/test.gif" alt="Name2 - blah blah Name2"><br /)
etc.

Thanks in regard

(had to replace >< with () )


See More: Replace xxx with yyy from a *.txt file

Report •

#1
October 12, 2011 at 20:06:32
If XXX is always a constant value, this will be fairly straight-forward. If XXX varies, it could get complicated. Can you post an example containing two representative lines of html?

Report •

#2
October 13, 2011 at 07:05:36
Surtainly :-) <> brackets are replaced by ()

(img src="/images/us.gif" alt="Verdensur Alameda - Se lokaltiden i Alameda"> Alameda<br /)
(img src="/images/us.gif" alt="Verdensur Alhambra - Se lokaltiden i Alhambra"> Alhambra<br /)


Report •
Related Solutions


Ask Question