Here you can find the source of sanitizeCompletion(String replace)
public static String sanitizeCompletion(String replace)
//package com.java2s; /******************************************************************************* * Copyright (c) 2017 Red Hat Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from ww w . j a v a 2 s. com*/ * Red Hat Inc. - initial API and implementation *******************************************************************************/ public class Main { private static final String ESCAPE_DOLLAR = "\\\\\\$"; private static final String DOLLAR = "\\$"; public static String sanitizeCompletion(String replace) { return replace == null ? null : replace.replaceAll(DOLLAR, ESCAPE_DOLLAR); } }