For example: Give a list of values, add <option></option>, <a></a>, and so on to some labels.
The code is as follows |
|
To be replaced by: <option value= "1" >1</option> <option value= "2" >2</option> <option value= "3" >3</option> <option value= "4" >4</option> |
Ctrl+h Open the replacement window and enter in the lookup target: (. +)
Enter in Replace with: <option value= "$1″>$1</option>
Click on "Replace All" to complete this task, very simple.
Here, in Find Target, the () represents a match, and the corresponding representation of the first pair of parentheses in replace with. If you have more than one string to match, use multiple parentheses and pass $, $, $ ... You can replace it. More complex and precise replacements also require more knowledge of regular expressions.
The Dreamweaver replacement input box is larger and is easy to use when multiple lines of content are replaced.
Not only do most editors, such as Notepad,editplus, Dreamweaver, also support regular expressions, they can also bulk replace files in the specified folder, open files, and so on, quite powerful. For a large number of replacement tasks, take a little more time to understand how to apply a good regular replacement function, you can save a lot of time in the work.