A
A
Alexander2015-11-19 14:02:55
Regular Expressions
Alexander, 2015-11-19 14:02:55

How to do complex text replacement in Notapad++?

I ask for help with the replacement in Notepad++
Given a lot of lines like ;www.youtube.com/v/ RPNmTgEQdSo ;
You need to replace the simple YouTube URL with the video embed code.
It turns out that you need to replace the text around the unique part of RPNmTgEQdSo , and put it in the middle of the code

<iframe width="853" height="480" src="https://www.youtube.com/embed/RPNmTgEQdSo" frameborder="0" allowfullscreen></iframe>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valentine, 2015-11-19
@Alexx_ps

Looking for:
Replace with
(not tested, there is no machine with Windows)
Use parentheses () to select the part of the expression that needs to be captured, and in the replace field for insertion, use the pointer to the captured expression \1
See the example in the documentation , it may become clearer :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question