I want to find "from tag to closed tag" in the regular expression.

Asked 1 years ago, Updated 1 years ago, 34 views

In the following cases, how should I write a regular expression?
There are nearly 100 html files for the purpose of replacing them all at once.

<div class="test">
There are some tags and sentences.It is not constant.
<!--Comments-->
</div>

This is a postscript.Because it is replaced by a tool called devas, it is not particularly Linux or php.
Excuse me.

regular-expression

2022-09-29 21:46

1 Answers

After receiving the hint, I was able to search below and solve the problem.
Start with ^.* (Something will be done in time and end with a text tag behind it)

^<div class="test">.* -->/div>


2022-09-29 21:46

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.