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 444603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:17:13+00:00 2026-05-12T21:17:13+00:00

Hi I have some html text coming from an rich text control. something like:

  • 0

Hi I have some html text coming from an rich text control.
something like:

<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0000FF"   LETTERSPACING="0" KERNING="0"><A HREF="event:http://bbc.co.uk" TARGET="_blank"><U>l</U></A><U>ink1</U><FONT COLOR="#000000"> blah blah blah. another <FONT COLOR="#0000FF"><A HREF="event:http://cnet.com" TARGET="_blank"><U>link2</U></A></FONT> blah blah</FONT></FONT></P></TEXTFORMAT>

I would like to extract all A tags ie:

<A HREF="event:http://cnet.com" TARGET="_blank"><U>link2</U></A>

Should I be looking into reg expressions or are there any string utils that would accomplish this.

Any hints/help much appreciated.

  • 1 1 Answer
  • 3 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-12T21:17:14+00:00Added an answer on May 12, 2026 at 9:17 pm

    Yaa, You need to look into regular expressions because String utilities are basic String manipulation techniques. You can start with this:

    var pattern:RegExp = /<A.*?</A>/;
    var str:String = '<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0000FF"   LETTERSPACING="0" KERNING="0"><A HREF="event:http://bbc.co.uk" TARGET="_blank"><U>l</U></A><U>ink1</U><FONT COLOR="#000000"> blah blah blah. another <FONT COLOR="#0000FF"><A HREF="event:http://cnet.com" TARGET="_blank"><U>link2</U></A></FONT> blah blah</FONT></FONT></P></TEXTFORMAT>';
    trace(pattern.exec(str));
    

    It will output <A HREF="event:http://bbc.co.uk" TARGET="_blank"><U>l</U></A>.

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

Sidebar

Related Questions

I have some HTML like this: <input type=radio class=MyRadio name=TheName> <label for=TheLabel>the text</label> How
On extracting some html from a web page, I have some elements containing text
I have HTML + CSS text. I need some lib with simple function like
I have some text coming from xml file text reads as &li;br/ &gt; which
I have some html files that I want to convert to text. I have
I have some text that has HTML hyper-links in it. I want to remove
I have a web page with a read-only text box which shows some HTML
I have a JeditorPane which has some text in HTML format. When I execute
I have a UIWebView containing html-formatted text. In the text some words are links.
I have this html file where I want to overlay some text over another.

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.