Quote:
Originally Posted by Turtle91
You can even do it with one regex...ASSUMING you do not have nested <div>s:
Code:
find: <div.*?class="Basic-Text-Frame">(.*?)</div>
replace:\1
or TagMechanic
|
Personally, I would use TagMechanic since it handles nested divs. The code above would stop on the first </div> rather than the matching </div> which would break nested <div>s. In the example below, a regex search would match on the first </div> bolded rather than the last </div> bolded. And yes, this is from a real ebook produced by Vellum. The only change is replacing the first <div> with the sample from the OP.
Code:
<div id="_idContainer020" class="Basic-Text-Frame">
<div class="heading">
<div class="heading-contents">
<div class="title-block">
<div class="element-number-block">
</div>
<div class="title-block">
<h1 class="title">Chapter 2</h1>
</div>
</div>
</div>
</div>
</div>