org.javers.common.string.RegexEscape Maven / Gradle / Ivy
package org.javers.common.string;
/**
* @author bartosz.walacik
*/
public class RegexEscape {
private static final String TO_ESCAPE = "\\.[]{}()*+-?^$|";
public static String escape(String literal) {
String escaped = literal;
for (int i=0; i