Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

98.Advanced search and replace -- How to make html tags for image file list automatically?

User: editor -- 2008-05-14
Hits: 180
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
I have a list of image files, like a1.jpg, a2.jpg, ..., how to make an html tag for each image? need to show image name without '.jpg' extension when mouse move to the picture.
Input Sample:
a1.jpg
a2.jpg
a3.jpg
Output Sample:
<img src="a1.jpg" alt="a1">a1.jpg</img>
<img src="a2.jpg" alt="a2">a2.jpg</img>
<img src="a3.jpg" alt="a3">a3.jpg</img>
Answer:
Hint: You need to Download and install "Replace Pioneer" to finish following steps.
1. ctrl-o open source file(list of image files)      
2. ctrl-h open replace dialog,      
in 'Replace' page,
1)set 'replace unit' to 'Line' 
2)set 'Search for Pattern': 
 means for every line 
3)set 'Replace with Pattern': 

3. Click 'Replace', that's ok!

Note:
1. double quote " must add a leading \, like \".
2. chars($match,1,-5) means from first char to bottom 5 char, chars("123.jpg",1,-5) will return 123.
Download Script:  scripts/98.rst.zip

Similar Examples:
How to extract tables from html files into csv file automatically? (63%)
How to remove/delete ending spaces of all lines automatically? (60%)
How to split every file in a directory automatically? (58%)
How to detect encoding type of a text file automatically? (56%)
How to capitalize the first words of each sentence automatically? (54%)
How to make batch operations for following file list? (54%)
How to format all the data in the text file with 8.2 format? (53%)
How to download all html pages with images on some website? (52%)

Check Demo of Advanced search and replace