Home >Backend Development >PHP Problem >How to batch delete comments in php using DW

How to batch delete comments in php using DW

coldplay.xixi
coldplay.xixiOriginal
2020-08-05 13:58:302520browse

How to use DW to delete comments in batches in php: 1. Delete single-line comments and use [//.*] for regular replacement; 2. Delete multi-line comments and use regular expressions [/\*[ \S\s] ?(?=\*/)\*/] Just search for a match.

How to batch delete comments in php using DW

How to use DW to delete comments in batches in php:

1. Delete single line comments

Open Dreamweaver's search tool and select regular replacement as shown in the figure:

How to batch delete comments in php using DW

## The

//.* is a regular match Expression of single-line comments

2. Delete multi-line comments

Also use regular expressions to find matches, as shown above:

How to batch delete comments in php using DW

The regular expression is

/\*[\S\s] ?(?=\*/)\*/

is the expression that matches multi-line comments

There are two points to note. 1. Use regular expressions must be checked; 2. You cannot search all in dw. You must click one by one to find the next one, or you can click Replace All

Related learning recommendations:

php graphic tutorial

The above is the detailed content of How to batch delete comments in php using DW. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn