I have string like this:
<a hidden="true" href="xxx" class=" zt-uie-session </a>
How to extract href value in Android? It's string, not some object.
you can use Jsoup library for easily extract html attributes
Document doc = Jsoup.parse("<a href='link' />");
Element link = doc.select("a").first();
return link.attr("href"); //xxx
Doc here
hiddenandclassalways going to be there? Showing just one string isn't enough. Please show more examples of how the string can change, what format is the string in.Stringfunctionallity.. If this tag isn´t really illformed as in your question just use a html parse to do the job