Regular Expression | Catch part of content between 2 markers [duplicate]

-1

I do not have any regular expression knowledge, so I do not know if it's possible to solve my problem.

  

In all the HTML of a website, it always has code similar to this.

"placeholder":"https:\/\/ci.hdv6.com\/videos\/78\/13\/8787575\/thumbs_65\/(m=eaAaGwObaaaweyaY)(mh=c_sPzVwXUfENWpYI)6.jpg",

I would like to do the following.

Get all content that starts at:

  

"placeholder": "

And ends in:

  

",

In case it would be:

https:\/\/ci.hdv6.com\/videos\/78\/13\/8787575\/thumbs_65\/(m=eaAaGwObaaaweyaY)(mh=c_sPzVwXUfENWpYI)6.jpg
  

I'm using CURL to get all the HTML of a website, so I can find a ceiling like this to just get this link.

It is extremely important to pick up the word PLACEHOLDER as the initial marker as there are other similar links on the site.

    
asked by anonymous 06.08.2018 / 02:23

1 answer

0
let string = "placeholder:https:\/\/ci.hdv6.com\/videos\/78\/13\/8787575\/thumbs_65\/(m=eaAaGwObaaaweyaY)(mh=c_sPzVwXUfENWpYI)6.jpg"

let result = /https.+jpg$/.exec(string)[0]

console.log(result);
    
06.08.2018 / 02:50