K
K
krasnblj2015-10-08 19:53:42
HTML
krasnblj, 2015-10-08 19:53:42

How to replace a tag using regular expressions in Notepad++?

To replace <span class=one>Контент</span>with <h1>Контент</h1>
, they advised a regular expression <[^>]+class=one>(.*)<.+>with a replacement for <h1>$1</h1>
The problem is that for <span class=one><p>Контент</p></span>does not work anymore.
Manual with an explanation of square brackets [ and the expression $1 was not found

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vista1x, 2015-10-08
@krasnblj

If you do not need something universal, then just add the desired tag to the regular expression
<[^>]+class=one><p>(.*)<\/p><.+>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question