| User: editor -- 2008-11-27 << 299 301 >> |
| Hits: 411 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| How to replace all "ID" in following xml file with increased ID? |
| Input Sample: |
| <student id="ID" name="Tommy"> <student id="ID" name="Jenny"> <student id="ID" name="Mary"> <student id="ID" name="Harry"> ... |
| Output Sample: |
| <student id="1" name="Tommy"> <student id="2" name="Jenny"> <student id="3" name="Mary"> <student id="4" name="Harry"> ... |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| 1. ctrl-o open source file 2. ctrl-h open "Replace" dialog set "Search for Pattern" to: set "Replace with Pattern" to: 3. click "Replace", done! Note: $word_no is the sequence number of matched unit. |
| Download Script: scripts/300.rst.zip |
Screenshot 1: Replace_Window |
Similar Examples: |
| How to replace strings in multiple files with a global increasing ID? (61%) How to replace all OLD with NEW only in line 100 to line 300? (59%) How to replace all the numbers in a text file to the square value? (58%) How to make batch operations for following file list? (55%) How to replace all the password field in text file with random chars? (54%) How to delete all lines appear in file B from file A? (53%) How do I replace all the tags <hr /> in many html files? (53%) How to rename all the files by adding the file size after filename? (52%) |
Check Demo of Advanced search and replace |
| Keywords: |
| xml increase sequence number increas sequence seq matched number ber num matched sequence number replace with sequence number replace with number sequence replace sequence number replace in sequence unit number with number file number |