|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.htmlparser.filters.LinkRegexFilter
This class accepts tags of class LinkTag that contain a link matching a given regex pattern. Use this filter to extract LinkTag nodes with URLs that match the desired regex pattern.
Field Summary | |
protected java.util.regex.Pattern |
mRegex
The regular expression to use on the link. |
Constructor Summary | |
LinkRegexFilter(java.lang.String regexPattern)
Creates a LinkRegexFilter that accepts LinkTag nodes containing a URL that matches the supplied regex pattern. |
|
LinkRegexFilter(java.lang.String regexPattern,
boolean caseSensitive)
Creates a LinkRegexFilter that accepts LinkTag nodes containing a URL that matches the supplied regex pattern. |
Method Summary | |
boolean |
accept(Node node)
Accept nodes that are a LinkTag and have a URL that matches the regex pattern supplied in the constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.regex.Pattern mRegex
Constructor Detail |
public LinkRegexFilter(java.lang.String regexPattern)
regexPattern
- The pattern to match.public LinkRegexFilter(java.lang.String regexPattern, boolean caseSensitive)
regexPattern
- The regex pattern to match.caseSensitive
- Specifies case sensitivity for the matching process.Method Detail |
public boolean accept(Node node)
accept
in interface NodeFilter
node
- The node to check.
true
if the node is a link with the pattern.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |