You need to write a regular expression that could get any link from this tag:

meta property = "og: image" content = "https://scontent-fra3-1.cdninstagram.com/t51.2885-15/e35/14276400_1742191619336501_90536135_n.jpg?ig_cache_key=MTMzMjc1MzEzNjkzMDQzMTEyNQ%3D%3D.2" />

Closed due to the fact that the essence of the issue is not clear to the participants of Kromster , Denis , Harry , pavel , Denis Bubnov Jan 17 '17 at 13:00 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

    2 answers 2

    For HTTP and HTTPS links

    https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[az]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*) 

    Additionally, you can read the original

    • Not suitable, java swears at the _ and \ / \ / (www \.) Signs - Golandez
    • Added screening, try this - XIII-th
    • No, I still don't like something. But I kind of found another way. I'll try to do it through jsoup. Thanks for the help) - Golandez
    • Well, be sure to post the correct answer;) - XIII-th

    Made with Jsoup :

     Document doc = Jsoup.parse(metaTag); Element element = doc.select("meta").first(); String link = element.attr("content"); 
    • one
      I apologize, but the question was exactly how to make it a regular expression - XIII-th
    • I never found a regular expression) - Golandez