I have a response in html form from the server, now I want to read the characters or say data of between particular tag, for example: font tag starting—(The data that I want to read)—-font tag ending.
I have stored the string in a String Variable named “response”.
How can I do this in android?
Thanks,
david
You can probably use regex Pattern.
Here’s a little example, though it can be probably made more efficient and abstract:
Result:
P.S. You probably shouldn’t use this for large responses (and I think it’s not adviced to use regex for html). Maybe you should use some parser (SAX for one).