K
K
krasnblj2015-09-30 04:40:27
Automation
krasnblj, 2015-09-30 04:40:27

How to close a tag using regular expressions?

There is an HTML code

<span class=rvts6>Заголовок</span>
<span class=rvts8>Текст</span>

how to compose a regular expression so that
<span class=rvts6>Заголовок</span>it becomes <h1>Заголовок</h1>
, but <span class=rvts8>Текст</span>it becomes <p>Текст</p>
Perhaps there is some way besides regular expressions.
I tried deleting everything </span>, then closing the tags through HTML Tidy - it more or less works, but is not friendly with Cyrillic when running multiple times through macros

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question