0

I'm currently developing an online Multilingual Dictionary in JSP, for translation I'm using microsoft-translator-java-api, and for finding meaning I'm using services.aonaware.com/DictService/DictService dict service.

first I'm making request to services.aonaware.com/DictService/DictService dict service and I'm getting output after parsing

WORD

know v 1: be cognizant or aware of a fact or a specific piece of information; possess knowledge or information about; "I know that the President lied to the people"; "I want to know who is winning the game!"; "I know it's time" ...

now I want to get

be cognizant or aware of a fact or a specific piece of information; possess knowledge or information about

translated and I want

"I know that the President lied to the people"

be the same so I want to split string when ever ""/ double quote comes any help?

Arshad Ali
  • 3,082
  • 12
  • 56
  • 99
  • possible duplicate of [How to split a String in Java](http://stackoverflow.com/questions/3481828/how-to-split-a-string-in-java) – metacubed Jul 22 '14 at 05:29
  • So basically you want to split some string based on the position of a double-quote character. See the above link for a basic method ([`String.split`](http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#split%28java.lang.String%29)). – metacubed Jul 22 '14 at 05:31

1 Answers1

1
public static void main(String args[])
{
    String a = "a; \"b\". c";
    System.out.println("Original string:"+a);

    // split by "

    System.out.println("Split by \"");
    for (String string : a.split("\""))
    {
        System.out.println(string.replaceAll("[.;]", ""));
    } 
}
Alexandre Santos
  • 8,170
  • 10
  • 42
  • 64