List of usage examples for org.jsoup.nodes Document getElementsMatchingText
public Elements getElementsMatchingText(Pattern pattern)
From source file:com.screenslicer.common.CommonUtil.java
public static Element getElementMatchingText(Document doc, String tagName, String pattern, boolean ownText) { if (doc == null) { return null; }// w w w .ja v a 2s . c om Elements elements = ownText ? doc.getElementsMatchingOwnText(pattern) : doc.getElementsMatchingText(pattern); for (Element element : elements) { if (element.tagName().equalsIgnoreCase(tagName)) { return element; } } return null; }