Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3627460
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:53:29+00:00 2026-05-18T23:53:29+00:00

I have a response in html form from the server, now I want to

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T23:53:30+00:00Added an answer on May 18, 2026 at 11:53 pm

    You can probably use regex Pattern.
    Here’s a little example, though it can be probably made more efficient and abstract:

    public static void main(final String[] args) {
        final String html = "Some text <font> here </font>, and some <font>there</font>";
        final Pattern ptrn = Pattern.compile("<font>(.+?)</font>");
        final Matcher mtchr = ptrn.matcher(html);
        while (mtchr.find()) {
            final String result = html.substring(mtchr.start(), mtchr.end()).replace("<font>", "").replace("</font>", "");
            System.out.println(result);
        }
    }
    

    Result:

     here there
    

    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).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a webrequest that returns a html response which has form inside with
In an oscommerce site I have the following: Server response = Content-type: text/html;charset=UTF-8 and
Usually when I get POST data it's send from a HTML form and the
I'm trying to generate a JSON response that includes some HTML. Thus, I have
I have response stream from a ftp web request that returns binary file. I
I have a JSON response that is formatted from my C# WebMethod using the
I have developed code with Ajax and jQuery. I have got a response from
I have a simple code from a book and the code should display data
I have a user control which contains the following code: <form id=CurrencyForm method=post runat=server>
I have an HTML form like this: form.html: <html> <body> your name is :<br><br>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.