Java String Quote Unescape unescapeDoubleQuote(String string)

Here you can find the source of unescapeDoubleQuote(String string)

Description

Remove o escape de todas as aspas duplas de um texto.

License

Open Source License

Parameter

Parameter Description
string O texto com escape de aspas duplas.

Return

O texto sem escape.

Declaration

public static String unescapeDoubleQuote(String string) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from   w ww .j  a v  a2  s  .  co m
     * Remove o escape de todas as aspas duplas de um texto.
     *
     * @param string
     *    O texto com escape de aspas duplas.
     *
     * @return
     *    O texto sem escape.
     */
    public static String unescapeDoubleQuote(String string) {

        return string.replaceAll("\\\\\"", "\"");
        //     string.replaceAll( \\" , " );  <- O que as Strings representam
        //     string.replaceAll( \" , " );   <- O que a maquina regex entende
    }
}

Related

  1. unescape(CharSequence string, int quoteChar, boolean useAsciiEscapes, StringBuilder sb)
  2. unescapeDoubleQuote(String stringToReplace)
  3. unescapeDoubleQuotes(String string)
  4. unescapeDoubleQuotesAndBackslashes(final String input)
  5. unescapePhpSingleQuotedStringContent(String escapedContent)