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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:58:46+00:00 2026-05-12T16:58:46+00:00

I tried to extract text from html text stored in a db. This is

  • 0

I tried to extract text from html text stored in a db.

This is an example:

<P style="FONT-SIZE: 13px; MARGIN-LEFT: 6px"><FONT color=#073b66><STRONG><A 
href="/generic.asp?page_id=p00497">Practice Exams</A> - </STRONG><FONT 
color=#000000>ours are the most realistic exam simulations, and the best way to 
prepare for your exams. Get detailed correct and incorrect answers and 
explanations. Free Flash Cards are included.</FONT></FONT> </P>

If I search “generic” this regex must find it if this text is over the html tag.

Please 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-12T16:58:47+00:00Added an answer on May 12, 2026 at 4:58 pm

    The following MySQL regex string will match all the html tags, so you can strip them out

    "<" +       -- Match the character “<” literally
    "[^>]" +    -- Match any character that is NOT a “>”
       "*" +       -- Between zero and unlimited times, as many times as possible, giving back as needed (greedy)
    ">"         -- Match the character “>” literally
    

    OR

    I know this does not answer your question directly, but if you have access to scripting languages, they normal have built in functions for stripping html tags from text.

    eg. in php you can do this…

    $htmltext = '<p>Test paragraph.</p><!-- Comment --> <a href="#fragment">Other text</a>';
    $plaintext = strip_tags($text);
    
    // or use regex...
    $result = preg_replace('/<[^>]*>/i', '', $text);
    

    http://php.net/manual/en/function.strip-tags.php

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

Sidebar

Related Questions

I'm using Zend_Pdf library for extract text from pdf and I have some problems...
Tried to map it from Preferences -> Settings -> Keyboard, but the key combo
Tried something like this: HttpApplication app = s as HttpApplication; //s is sender of
I tried scouring the web for help on this issue, but there are so
I tried this XAML: <Slider Width=250 Height=25 Minimum=0 Maximum=1 MouseLeftButtonDown=slider_MouseLeftButtonDown MouseLeftButtonUp=slider_MouseLeftButtonUp /> And this
I'm trying to get the previous tag from $('#marker').prevAll(span.curPos:eq(1)); Problem is that the HTML
I am scraping HTML file using BeautifulSoup in python. I want to delete text
I want to extract different content from a PDF file in Java: The complete
I am trying to extract a sub string from a string in python. My
I just tried using the example given on developers.facebook.com to open a request form

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.