using backslash escape character \\"represent the double quotes character in java
\\"
// match the string starts and end with a double quote if (str.matches("\".*\"")) { }