V
V
Valery Pavlenko2019-02-16 16:49:47
Regular Expressions
Valery Pavlenko, 2019-02-16 16:49:47

How to change image link regularly using Notepad++?

Connoisseurs, please tell me how to do the following in Notepad ++ with a regular routine:

  • The link to the image from the a tag must be cut and pasted with a replacement into the img tag.
  • Delete everything before the img tag and at the end - the closed a tag.

Initial data :
<a class="highslide" href="https://site.ru/uploads/posts/2019-02/1550317054_03-tablica02.png" rel="highslide" target="_blank"><img src="https://site.ru/uploads/posts/2019-02/medium/1550317054_03-tablica02.png" alt="" class="fr-dii fr-draggable"></a>

Outcome (what you want to get):
<img src="https://site.ru/uploads/posts/2019-02/1550317054_03-tablica02.png" alt="" class="fr-dii fr-draggable">

Picture for clarity , what needs to be done:
7033e4c94b38.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2019-02-16
@trudogolik

For example, <a [^>]*>(<img [^>]*>)</a>replace with $1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question