H
H
hyperion922021-01-14 12:55:17
Regular Expressions
hyperion92, 2021-01-14 12:55:17

How to frame the text with the desired tag with a class after the colon in notepad++?

There are 50 blocks . In each of them (inside the p tag) there is some text at the end of which there is a colon. The colon can be followed by a space and text. For example, 25 rubles (consider the space that you set). How to use notepad++ regular expressions to frame the rest of the text (including space) for example in a tag ? <div class="hide"><p class="text"></p></div>

<span class="stats-price"></span>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WbICHA, 2021-01-14
@WblCHA

IMHO, in order not to worry about what kind of text inside the "p", you can do it in 2 steps:

'<p class="text">' => '<p class="text"><span class="stats-price">'
'(.(?<!:\s).*</p>)' => '</span>$1'

In the first case, even the regexp is not needed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question