Regex - Select First Match from Javascript Code : <p>I'm trying to get the url of a javascript code.
Everything was fine until I noticed that this code randomly shows 3 or more url within the same line, so the PHP function I was using no longer worked for me.</p>

<p>So I am trying to select from the following code only the first URL but I am not good with the regex (its in one line):</p>

<pre><code>"https:\/\/sample.domain.com\/201706\/26\/13912879\/720p_1500k_13912879\/sample_video_name.mp4?rate=190k&amp;burst=1200k&amp;validfrom=1499826300&amp;validto=1499840700&amp;hash=%2BDsIFr8fnCAx2cz%2BAgsQEY9jjb4%3D"},{"defaultQuality":false,"format":"","quality":"480","videoUrl":"https:\/\/sample.domain.com\/201706\/26\/13912879\/480p_750k_13912879\/sample_video_name_2.mp4?rate=108k&amp;burst=1200k&amp;validfrom=1499826300&amp;validto=1499840700&amp;hash=8rL1ttX15bHmwFKINHUUewnEv8A%3D"},{"defaultQuality":false,"format":"","quality":"240","videoUrl":"https:\/\/sample.domain.com\/201706\/26\/13912879\/240p_240k_13912879\/sample_video_name_3.mp4?rate=59k&amp;burst=1200k&amp;validfrom=1499826300&amp;validto=1499840700&amp;hash=Frj6AcBMp8zrHKttan%2BDYEmktTY%3D"
</code></pre>

<p>I tried to use the following code but this one selects me all the url, I just want the first one:</p>

<pre><code>https:([^"]+)
</code></pre>

<p>Example with regexr:
<a href="http://regexr.com/3gb4u" rel="nofollow noreferrer">http://regexr.com/3gb4u</a></p>
