Package com.h3xstream.retirejs.util
Class RegexUtil
- java.lang.Object
-
- com.h3xstream.retirejs.util.RegexUtil
-
public class RegexUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description RegexUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringreplaceMatch(java.lang.String replacePattern, java.lang.String data)static java.lang.StringreplaceVersion(java.lang.String regex)static java.lang.StringsimpleMatch(java.util.regex.Pattern pattern, java.lang.String data)
-
-
-
Method Detail
-
simpleMatch
public static java.lang.String simpleMatch(java.util.regex.Pattern pattern, java.lang.String data)- Parameters:
pattern- Pattern to find containing a single group to match. The group is mark in parentheses.data- The source of data to process (URI, filename, js content, ..)- Returns:
- Match of the first group extract
-
replaceMatch
public static java.lang.String replaceMatch(java.lang.String replacePattern, java.lang.String data)- Parameters:
replacePattern- The format expected is /(FIND_SOMETHING)/(REPLACE_BY_SOMETHING)/data- The source of data to process (URI, filename, js content, ..)- Returns:
- Match of the first group extract
-
replaceVersion
public static java.lang.String replaceVersion(java.lang.String regex)
-
-