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

  • Home
  • SEARCH
  • 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 6785225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:06:04+00:00 2026-05-26T17:06:04+00:00

pls help me. how can I split this String value? my code below wont

  • 0

pls help me.

how can I split this String value?

my code below wont work:

String[] tempStr;

toSplit = "This is the just a sample <FONT COLOR=BLACK>1)[option1/option2]</FONT> sentence. This is another sample <FONT COLOR=BLUE>1)[othertext1/othertext2]</FONT> sentence."

tempStr = toSplit.split("<FONT COLOR = [A-Z]*>([.])*</FONT>");

what i want guys is to split the paragraph with the delimiter …. thanks for any help.

  • 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-26T17:06:05+00:00Added an answer on May 26, 2026 at 5:06 pm

    It depends how would you like to split. If you need to extract the text fragments as a array elements and remove all HTML tags you can say something like the following:

    tempStr = toSplit.split("<FONT.*?</FONT>");

    Pay attention. I do not write all attributes of FONT tag. It is not needed here. My expression is simpler and do not have to care about spaces, quotes etc.

    But this regex is case sensitive. To be more flexible and be able to use various flags supported by Pattern use java.util.Pattern, create Matcher and then use its split() method.

    BTW if your parsing may be more complicated I’d recommend you to use “real” html parser.

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

Sidebar

Related Questions

can anyone pls help me convert this to vb.net for each (DictionaryEntry<String, Int64> entry
How can i Remove this error. pls Help me in this... Error 1 Cannot
I have got the string like this below.... string a = backup-2011-10-12_17-16-51.zip How can
I am trying to create a slider like this example. pls anyone help me.
I know this very silly, but can anybody help me in understanding what does
My brain aint functioning atm.. Can you pls help me out here: Got a
pls use this http://code.google.com/p/google-web-toolkit-doc-1-6/wiki/DevGuideJavaFromJavaScript IFI means int float int but if i want to
How can i track if text in editText is changed without using textWatcher?Pls help..
Pls check code .html form gets submitted even if javascript returns false. <form id=form1
I want to create a XML file in csharp like the below format pls

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.