|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.rssowl.util.shop.RegExShop
Factory class for regular expression concerns in RSSOwl
Field Summary | |
private static String |
HTML_ANCHOR_REGEX
The reg. expression to match HTML Anchors |
private static Pattern |
HTML_ANCHOR_REGEX_PATTERN
The compiled pattern to match HTML Anchors (is Case Insensitive) |
(package private) static String |
HTML_TAG_REGEX
The reg. expression for HTML tags |
(package private) static Pattern |
HTML_TAG_REGEX_PATTERN
The compiled pattern to match HTML tags |
static String |
REGEX_OK
Constant to show that regex was compiled successfully |
private static String[] |
regExSymbols
List of common RegEx special chars |
private static String |
URL_REGEX
The reg. expression for an URL |
private static Pattern |
URL_REGEX_PATTERN
The compiled pattern to match an URL |
(package private) static Pattern |
WHITESPACE_PATTERN
The compiled pattern to match Whitespaces |
private static String |
WHITESPACE_REGEX
The reg. expression to match Whitespaces |
Constructor Summary | |
private |
RegExShop()
This utility class constructor is hidden |
Method Summary | |
static String |
compileRegEx(String str)
Compile a String and return either "OK" if the String is a valid RegEx, or the warning message if not. |
static String |
escapeRegEx(String str)
Escape RegEx special chars from the String and return it. |
static void |
extractLinksFromHTML(String text,
Vector linkList)
Extract all links from the given String and fill them into the given HashSet. |
static void |
extractLinksFromText(String text,
Vector linkList)
Extract all links from the given String and fill them into the given HashSet. |
static boolean |
isInsideTags(String haystack,
String needle)
Returns TRUE in case the needle is surrounded by tags or includes tags inside the haystack |
static boolean |
isValidURL(String url)
Check if the given URL is valid |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String REGEX_OK
private static final String HTML_ANCHOR_REGEX
private static final Pattern HTML_ANCHOR_REGEX_PATTERN
private static final String[] regExSymbols
private static final String URL_REGEX
private static final Pattern URL_REGEX_PATTERN
private static final String WHITESPACE_REGEX
static final String HTML_TAG_REGEX
static final Pattern HTML_TAG_REGEX_PATTERN
static final Pattern WHITESPACE_PATTERN
Constructor Detail |
private RegExShop()
Method Detail |
public static String compileRegEx(String str)
str
- Any String interpreted as RegEx
public static String escapeRegEx(String str)
str
- Any String
public static void extractLinksFromHTML(String text, Vector linkList)
text
- The String to search for linkslinkList
- The collection to fillpublic static void extractLinksFromText(String text, Vector linkList)
text
- The String to search for linkslinkList
- The collection to fillpublic static boolean isInsideTags(String haystack, String needle)
haystack
- The String to search for tagsneedle
- The String to check if surrounded by tags
public static boolean isValidURL(String url)
url
- The URL to check
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |