com.h3xstream.retirejs.util
Class RegexUtil

java.lang.Object
  extended by com.h3xstream.retirejs.util.RegexUtil

public class RegexUtil
extends Object


Constructor Summary
RegexUtil()
           
 
Method Summary
static String replaceMatch(String replacePattern, String data)
           
static String replaceVersion(String regex)
           
static String simpleMatch(Pattern pattern, String data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexUtil

public RegexUtil()
Method Detail

simpleMatch

public static String simpleMatch(Pattern pattern,
                                 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 String replaceMatch(String replacePattern,
                                  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 String replaceVersion(String regex)


Copyright © 2015. All rights reserved.