Question: I have some emails whose content is in html format and I want to save in database in readable format any inputs.

Also i have got emails dumped in a text file and i need to extract data from it.Any inputs .All in java

Answer: 
You could try removing all tags, leaving just the "text" of the tag content:

```
String text = str.replaceAll("(?m)<.*?>", "");

```

But it's not going to work for all cases.
HTML ***is*** a "readable" format. But if you're looking for something to abstract away the HTML-isms, there are several libraries you can look at. [jsoup](http://jsoup.org/) is one example. Mostly the keywords to look for here are "DOM", "HTML parser", and "XSS prevention".