Class URLUtils
- java.lang.Object
-
- org.jboss.set.aphrodite.domain.internal.URLUtils
-
public final class URLUtils extends Object
- Author:
- Tomas Hofman (thofman@redhat.com)
-
-
Field Summary
Fields Modifier and Type Field Description static StringURL_REGEX_STRINGSupports domain names and IPv4.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String[]extractGHUrls(String source, Pattern initialMatchPattern, boolean multiple)static String[]extractURLs(String source, Pattern initialMatchPattern, boolean multiple)Extracts URLs matching given pattern from given String.
-
-
-
Field Detail
-
URL_REGEX_STRING
public static final String URL_REGEX_STRING
Supports domain names and IPv4. Is more permissive than spec of course. TODO: IPv6 support.- See Also:
- Constant Field Values
-
-
Method Detail
-
extractURLs
public static String[] extractURLs(String source, Pattern initialMatchPattern, boolean multiple)
Extracts URLs matching given pattern from given String.- Parameters:
source- String to extract URLs from.initialMatchPattern- Pattern that URLs must match.multiple- If false, return the first URL only, if true, return all.- Returns:
- URLs matching
initialMatchPattern
-
-