How to get page meta (title, description, images) like facebook attach url using Regex in .java
As Ishikawa Yoshi mentioned, use JSoup
Example:
Document doc = Jsoup.connect("http://example.com/").get()
for(Element meta : doc.select("meta")) {
System.out.println("Name: " + meta.attr("name") + " - Content: " + meta.attr("content"));
}
This code is untested, hope this helps.
Using RegEx for scraping a document is a bad idea, read about it on Coding Horror