Answer the question
In order to leave comments, you need to log in
Replacing youtube url with video frame in Sublime text 3 in html?
Hello experts! I have lines of text like:
<a target="_blank" href="https://www.youtube.com/watch?v=pahhmV4WUUU">
<iframe width="560" height="315" src="https://www.youtube.com/embed/pahhmV4WUUU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Answer the question
In order to leave comments, you need to log in
find:
<a [^>]*href="https://www\.youtube\.com/watch\?v=([^"&]+)[^>]*>(?s:.*?)</a>
<iframe width="560" height="315" src="https://www.youtube.com/embed/$1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question