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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:26:53+00:00 2026-06-01T20:26:53+00:00

I have various HTML documents that I’m trying to extract the links to: (1)

  • 0

I have various HTML documents that I’m trying to extract the links to: (1) other html documents, (2) image files such as .jpg, .png and .bmp. I need a regular expression to do this and cannot seem to figure it out.

Each of the html pages will have code similar to the following:


IMG style=”MARGIN-BOTTOM: 20px; MARGIN-LEFT: 20px” align=right src=”images/sample001.jpg”>

IMG style=”MARGIN-BOTTOM: 25px; MARGIN-LEFT: 25px” align=right src=”images/sample002.png”>

IMG style=”MARGIN-BOTTOM: 20px; MARGIN-LEFT: 20px” align=right src=”images/sample003.bmp”>

href=”javascript:parent.POPUP({url:’testDoc001.htm’,type:’shared’,width:600,height:645})”>

href=”javascript:parent.POPUP({url:’testDoc002.html’,type:’shared’,width:700,height:712})”>


As an example, the regular expression would operate on the above HTML and produce the resulting array:

images/sample001.jpg

images/sample002.png

images/sample003.bmp

testDoc001.htm

testDoc002.html

Can someone help me out? Thanks so much.

  • 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-06-01T20:26:54+00:00Added an answer on June 1, 2026 at 8:26 pm

    Save yourself the frustration and bugs that you’ll encounter trying to parse HTML with regular expressions. Use an HTML parser like HTML Agility Pack.

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

Sidebar

Related Questions

I have various pieces of generated HTML/JS that I load into Activity with WebView#loadDataWithBaseURL.
I have a web application that lets users upload entire .html files to my
I am trying to display an image using purely javascript. I have found various
I have various HTML strings to cut to 100 characters (of the stripped content,
I have created web pages where am using pixel to position various html elements.
I have a HTML fragment which contains two anchor tags in various parts of
I have am HTML form in a PHP page. The form has various inputs.
I have a php script (generator.php) which generates certain HTML/XML/SVG depending on various conditions.
We have various related session variables for a complex page that has various things
I have various sections within a page of content that dynamically get replaced based

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.