A
A
Andrey Belov2016-07-03 10:49:31
PHP
Andrey Belov, 2016-07-03 10:49:31

How to autocorrect tags without taking into account the content between them?

Good day.
There is a huge piece of code in which there are many places like:
<span class="color_red">text text text</span>
You need to do autocorrect, let's say with:
<strong>text text text</stong>
I know, for example, how to replace only with the same in notepad ++ and then the same, but separately with . Then, yes, we will not touch the text and everything seems to be fine.. ..only everything will change , but in the code, not only: ..but also say.. ..and then I will get in places a mess of the form: ..what is rave. Theoretically, it is somehow possible to make a replacement like this: on Hence the question: "But how, in fact, can it be done? How? And is it possible at all?" I hope I made it clear.<span class="color_red"><strong></span></stong>
</span>
<span class="color_red">text text text</span>
<span class="color_blue">text text text</span>
<span class="color_blue">text text text</strong>
<span class="color_red">%%ignore_text%%</span>
<strong>%%ignore_text%%</strong>
Thanks for the possible answers.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2016-07-03
@Sonicelf

Use regular expressions for searching and replacing, many editors can work with them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question