-2

I am pretty new to regex expression ,i have a code source of an page and i want to extract URL from this code , am using matcher to find the url as a group ,am trying this regex expression Pattern.compile("\"https:.*?\"")for that but i still failed . the URL look like this :

"https://scontent-mad1-1.cdntest.com/vp/8e2f9af8362ea131062778fccbfda09e/5AEB6394/t51.2885-19/s320x320/12918047_263707850629206_1737689122_a.jpg"

the part with strong font is variable, and the rest of url is stable part

Any help pls !

YASSBRA Top10
  • 71
  • 1
  • 6

1 Answers1

-1

Can't you just use the .indexOf method if you know how the strings starts and ends?

String.Substring(string.indexOf("http"),string.indexOf(".jpg"))

Maybe you should add the .jpg at the end again.

Vysius
  • 1