Create 4 Regular Expressions regx in PHP to Strip Media ID's from URLS
$10-30 USD
Dibatalkan
Dibuat lebih dari 8 tahun yang lalu
$10-30 USD
Dibayar ketika dikirim
I need a few regular expressions created that will Extract the Video or Media ID's from some Social Network URLS. The Urls will vary so you need to have a good understanding of regular expressions for PHP.
Here is an example of a Regular expression inside an if statement that I am using to extract the Video ID from Youtube Videos:
if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $linkurl, $match)) {
$youtube_video_id = $match[1];
echo $youtube_video_id;
}
This Regular expression is capable of extracting the video ID from any of the following URL formats:
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
-It also works on the [login to view URL] URL with the same above options.
-It will also pull the ID from the URL in an embed code (both iframe and object tags)
The above expression will work if:
1) Url starts http or https
2) Video ID can be any length
3) Video ID May Have URL Parameters after it like "?param=test&whateveresle=something"
I need 4 Expressions like this created for URLS from: Vimeo, Instagram, flickr, and Vine
I have included a text file with all the possible URL formats I have found sorted by Website:
Vimeo
-----
1)be http or https
2)Video ID can be any length
3)Video ID May Have URL Parameters after it like "?param=test&whateveresle=something"
[login to view URL]
[login to view URL]
[login to view URL];byline=0&portrait=0
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
Instagram
---------
1)be http or https
2)Video ID can be any length
3)Video ID May Have URL Parameters after it like "?param=test&whateveresle=something"
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]://[login to view URL]
flickr
------
1)be http or https
2)Video ID can be any length
3)Photo ID May Have URL Parameters after it like "?param=test&whateveresle=something"
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]@N08/
Vine
----
1)be http or https
2)Video ID can be any length
3)Video ID May Have URL Parameters after it like "?param=test&whateveresle=something"
[login to view URL]
You can also look a discussion about the issue at the stackexchange URL below to see an example of what I need done.
[login to view URL]
This should be easy if you understand regular expressions. I do not so I need someone to do this for me. I need this asap, so please let me know.
Hello!
With 98% to 99% completion rate, 850+ successfully completed projects, and a 4.99 reputation (maximum possible, 5.0) (can be verified on my profile page https://www.freelancer.com/u/rajeshsonisl.html !!)... you can never go wrong choosing me :)
I am available to get started on your project right away. I look forward to your reply.
Thanks.
Kind Regards,
Rajesh Soni
Hi ! i am a professional Regular Expression Expert and i can create all of your Regular Expressions in 1 hour. i m not a PHP developer so i cant help you use Regex in PHP but i can create you Regex in 1 hour as i have alot of Handon Experience in Regex
Here is an example of Regex that i have made for you for extracting Vimeo URL
http(?:s)?://(?:www.|player.)?vimeo.com/.+?\r\n
Hi.
I had a lot of experience with regular expressions so I can do the job quickly and efficiently.
It shouldn't take longer than an hour to construct such expressions and test them.