When I write HTML with DW editor, I like to write comments, such as comments on <! — header >, and so on. When a large change is made, I need to search and replace in batch. In order to operate in batch, I write a regular expression to process it.
The effect is as follows:
Another common use is the character between strings
For example, find the characters between <! — header start > to <! — header end >, including line breaks.
As shown in the picture:
DW regular interpretation, for DW regularity, there is no pattern modifier like PHP, such as / I, / s
Therefore, the metacharacter (.) of DW does not match the newline character, so (| n |) *? Can only be used to replace the modifier of / s.
In DW, line breaks in windows and UNIX are line breaks, plus any characters. You can match multiple lines.