org.javers.common.string.RegexEscape Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javers-core Show documentation
Show all versions of javers-core Show documentation
JaVers - object auditing and diff framework for Java
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