Re: Checking equal number of <div> and </div> [message #171356 is a reply to message #171354] |
Thu, 30 December 2010 18:55 |
me
Messages: 192 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 12/30/2010 1:40 PM, Michael Fesser wrote:
> ..oO(jwcarlton)
>
>> Can you guys think of a good way for me to check a string to make sure
>> there are an equal number of<div (.*)> and</div>? Then, either add
>> or remove</div> tags as needed to make them match?
>
> You could run the string through Tidy.
>
> Micha
As an alternative try Notepad++. It does a nice job of tying markup tags
together, instantly highlighting the bookends (e.g., <d>...</d> or
<ul>...</ul>). There are a number of similar markup editors out there. I
tried this one first, liked it, and did not explore any others. Very
good for PHP also.
It does not have a tidy or beautify function, that is left to the markup
artist her or himself.
Bill B
|
|
|