title: Regex starts with ends with
body: <p>I can't figure out how to write a regex expression that finds a specific string that starts with, for example,  <code>https://</code> and ends with <code>.m3u8</code></p>
  
  <p>I managed to write a regex expression that highlights the specific part of the  string that contains the <code>.m3u8</code> tag</p>
  
  <pre><code>^(.*?(\m3u8\b)[^$]*)$
  </code></pre>
  
  <p>But I need to write an expression that highlights the whole string.</p>
  
  <p><a href="https://i.stack.imgur.com/AHNAF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AHNAF.png" alt="enter image description here"></a></p>
  
  <p>Added example  text as well </p>
  
  <p>INPUT</p>
  
  <pre><code>poster":"https://test/four/v1/video-file1/00/00/00/00/00/00/00/10/22/11/102211-480p.mp4/thumb-33000.jpg","content":{"mp4":[],"dash":"https://test/four/v1/video-file1/00/00/00/00/00/00/00/10/22/11/102211-,480,p.mp4.urlset/manifest.mpd","hls":"https://test/four/v1/video-file1/00/00/00/00/00/00/00/10/22/11/102211-,480,p.mp4.urlset/master.m3u8"},"about":"false","key":"4eeeb77181526bedc1025586d43a70fa","btn-play-pause":"true","btn-stop":"true","btn-fullscreen":"true","btn-prev-next":"false","btn-share":"true","btn-vk-share":"true","btn-twitter-share":"true","btn-facebook-share":"true","btn-google-share":"true","btn-linkedin-share":"true","quality":"true","volume":"true","timer":"true","timeline":"true","iframe-version":"true","max-hls-buffer-size":"10","time-from-cookie":"true","set-prerolls":["https://test/j/v.php?id=645"],"max-prerolls-impressions":1});
  </code></pre>
  
  <p>OUTPUT:</p>
  
  <pre><code>https://test/four/v1/video- 
  file1/00/00/00/00/00/00/00/10/22/11/102211-,480,p.mp4.urlset/master.m3u8
  </code></pre>
  
  <p>CAUTION: There are two other  HTTP links as well </p>
  
  <pre><code>https://test/four/v1/video- 
  file1/00/00/00/00/00/00/00/10/22/11/102211-,480,p.mp4.urlset/manifest.mpd
  </code></pre>
  
  <p>And,</p>
  
  <pre><code>https://test/four/v1/video-file1/00/00/00/00/00/00/00/10/22/11/102211-480p.mp4/thumb-33000.jpg
  </code></pre>
  
  <p>They must not be highlighted by regex because they start with http but they don't end with .m3u8</p>