- 1

extract link using regex

i have some images links that i extracted from a html using following regex :- ([a-zA-Z\-_0-9\/\:\.]*\.(jpg|jpeg|png|gif)) Here is the image urls :- (Notice that image name of few images is same but have different resolutions. So, write a regex to extract only one image which have high resolution https://www.jamuitoday.com/wp-content/uploads/2020/06/IMG-20200607-WA0028-300x150.jpg https://www.jamuitoday.com/wp-content/uploads/2020/06/IMG-20200607-WA0028-300x150.jpg https://www.jamuitoday.com/wp-content/uploads/2020/06/IMG-20200607-WA0028-768x384.jpg https://www.jamuitoday.com/wp-content/uploads/2020/06/IMG-20200607-WA0028.jpg https://www.jamuitoday.com/wp-content/uploads/2020/05/20200530_173823-300x225.jpg https://www.jamuitoday.com/wp-content/uploads/2020/05/20200530_173823-300x225.jpg https://www.jamuitoday.com/wp-content/uploads/2020/05/20200530_173823-768x576.jpg https://www.jamuitoday.com/wp-content/uploads/2020/05/20200530_173823.jpg https://www.jamuitoday.com/wp-content/uploads/2020/07/IMG-20200703-WA0004-300x180.jpg https://www.jamuitoday.com/wp-content/uploads/2020/07/IMG-20200703-WA0004-300x180.jpg https://www.jamuitoday.com/wp-content/uploads/2020/07/IMG-20200703-WA0004-768x461.jpg https://www.jamuitoday.com/wp-content/uploads/2020/07/IMG-20200703-WA0004-1024x614.jpg https://www.jamuitoday.com/wp-content/uploads/2020/07/IMG-20200703-WA0004-940x560.jpg https://www.jamuitoday.com/wp-content/uploads/2020/07/IMG-20200703-WA0004.jpg https://www.jamuitoday.com/wp-content/uploads/2015/12/advertis-300x54.jpg https://www.jamuitoday.com/wp-content/uploads/2015/12/advertis-300x54.jpg https://www.jamuitoday.com/wp-content/uploads/2015/12/advertis-768x139.jpg

15th Jul 2020, 5:30 AM
Manjit Kumar
Manjit Kumar - avatar
10 Respostas
15th Jul 2020, 6:54 AM
Calviղ
Calviղ - avatar
0
Calviղ there is no seperate resolution data... There are just links.. which have resolution already written in them.
15th Jul 2020, 7:02 AM
Manjit Kumar
Manjit Kumar - avatar
0
Manjit Kumar Check your img links again.. Not all links have resolution written on them.
15th Jul 2020, 7:15 AM
Calviղ
Calviղ - avatar
0
Manjit Kumar If ignore the links that don't have resolution data, here the code for you study in JS: https://code.sololearn.com/WUY6VS7gOcZO/?ref=app
15th Jul 2020, 7:20 AM
Calviղ
Calviղ - avatar
0
Calviղ Let's go for the links which don't have resolution mentioned... And can you write it in any other language like java , python , c++
15th Jul 2020, 7:27 AM
Manjit Kumar
Manjit Kumar - avatar
0
Manjit Kumar I don't know java, python, c++, c#, c...
15th Jul 2020, 7:29 AM
Calviղ
Calviղ - avatar
0
Calviղ Oh... Then , write the regex and program in js.
15th Jul 2020, 7:36 AM
Manjit Kumar
Manjit Kumar - avatar
15th Jul 2020, 7:56 AM
Calviղ
Calviղ - avatar
0
Calviղ i mean to find the links which don't have resolution written in them.
15th Jul 2020, 7:58 AM
Manjit Kumar
Manjit Kumar - avatar
0
Manjit Kumar The question seems differently from what I read initially 🧐Why? Anyway, you can modify my code to find the images, it's almost there. I better dont spoon feeding fully, leave you room to learn by changing the code.
15th Jul 2020, 9:04 AM
Calviղ
Calviղ - avatar