This question has already been answered:

Here is the regular:

#\[video\]http(s*)://(.+?)\[/video\]#si 

The user is given a frame, where src = (the address between the video tags).

Everything works, but instead of a video, you can put any page. How to check the availability of youtube.com ?

Reported as a duplicate by Visman members, aleksandr barakin , user194374, cheops , Streletz Jul 17 '16 at 14:50 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • four
    Here's the answer for you. Stackoverflow.com/questions/444149/… Returns the id of the video and the starting point in time if it is specified. If such a regular schedule fits, mark your question as a duplicate. - Visman

2 answers 2

I did not receive a normal response, I had to:

 /\[video\]https?:\/\/(?:[az\d-]+\.)?youtu(?:be(?:-nocookie)?\.com\/.*v=|\.be\/)([-\w]{11})(?:.*[\?&#](?:star)?t=([\dhms]+))?\[\/video\]/i 
  • You copied the regulars from my answer, so I think your question is a duplicate. Stackoverflow.com/questions/444149/… - Visman
  • @Visman I had to edit it, so your answer is just a remote tip - Rammsteinik
  • Of course, we added at the beginning of \[video\] and at the end of \[\/video\] - this greatly changed the behavior of the regular expression :) - Visman
  • @Visman if I don’t rummage in reg then this is normal for me - Rammsteinik

You can insert a search term in a link before a regular expression, something like this. Strripos () - of. documentation

  • I need to be a regular, I don’t think it’s difficult - Rammsteinik
  • @Rammsteinik I think then you should read this article in the wiki: ru.wikipedia.org/wiki/… there is a section "View Forward and Back" - LevBazdyrev
  • I don't need the template answers, I don't understand the regulars. - Rammsteinik