com.neotys.neoload.model.writers.RegExpUtils Maven / Gradle / Ivy
package com.neotys.neoload.model.writers;
/**
* This class utility methods are copied from com.neotys.nl.util.RegExpUtils
.
* Should be refactored to use the same code at some point.
*/
public class RegExpUtils {
// the states used for parsing
public static final int CONTINUE = 1;
public static final int ON_DOLLAR = 2;
public static final int EDIT_VAR = 3;
private static char[] reservedCars = new char[] { '.', '\\', '+', '*', '?', '(', ')', '{' , '}' ,'[', ']', '$', '^', '|' };
private RegExpUtils() {}
private static boolean isReservedCar(char c) {
for (int i=0; i \.txt
* @param sentence
* @return
*/
public static String escape(String sentence) {
StringBuilder result = new StringBuilder(sentence.length()+2);
for(int i=0;i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy