Package de.xima.fc.utils
Class XRegexUtils
- java.lang.Object
 - 
- de.xima.fc.utils.XRegexUtils
 
 
- 
public final class XRegexUtils extends Object
 
- 
- 
Constructor Summary
Constructors Constructor Description XRegexUtils() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringreplaceAll(String value, String search, BiFunction<String,Integer,String> replacer)Replace all occurrences of a search string in a string with a replacement string computed by a function.static StringreplaceAllPattern(String value, String searchPattern, BiFunction<MatchResult,Integer,String> replacer)Replace all occurrences matching the given pattern in a string with a replacement string computed by a function.static StringreplaceAllPattern(String value, Pattern search, BiFunction<MatchResult,Integer,String> replacer)Replace all occurrences matching the given pattern in a string with a replacement string computed by a function. 
 - 
 
- 
- 
Method Detail
- 
replaceAll
public static String replaceAll(String value, String search, BiFunction<String,Integer,String> replacer)
Replace all occurrences of a search string in a string with a replacement string computed by a function.- Parameters:
 value- The string to search in.search- The string to search for.replacer- The function to compute the replacement string.- Returns:
 - The resulting string.
 
 
- 
replaceAllPattern
public static String replaceAllPattern(String value, String searchPattern, BiFunction<MatchResult,Integer,String> replacer)
Replace all occurrences matching the given pattern in a string with a replacement string computed by a function.- Parameters:
 value- The string to search in.searchPattern- The pattern to search for.replacer- The function to compute the replacement string.- Returns:
 - The resulting string.
 
 
- 
replaceAllPattern
public static String replaceAllPattern(String value, Pattern search, BiFunction<MatchResult,Integer,String> replacer)
Replace all occurrences matching the given pattern in a string with a replacement string computed by a function.- Parameters:
 value- The string to search in.search- The pattern to search for.replacer- The function to compute the replacement string.- Returns:
 - The resulting string.
 
 
 - 
 
 -