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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:21:28+00:00 2026-06-01T22:21:28+00:00

in my project i want to retrieve tags from a web page for that

  • 0

in my project i want to retrieve tags from a web page for that i used dom methods.

But tags can be created dynamically like document.write(“<a href=”http://somedomain.com”>”);

here tags are given in the format of a string so i am trying to use regular expressions.

I want a regular expression which matches all the tags and attributes provided the expression should be able to extract specific attribute also

  • 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-01T22:21:30+00:00Added an answer on June 1, 2026 at 10:21 pm

    It is very hard to understand what you are asking and it is very unclear.

    First off: never use regex to parse HTML if you have an option. It looks simple right? No. You’ll find a problem sooner or later.

    Second: what David said.

    Now here’s a regex to match any HTML tag (have not tested it or anything so try it out first if you must):

    \<[^>]*\>
    

    Be warned it will match a script tag too (do not let users write any tag to your page, whitelist a few if you must, and be prepared to have trouble if you don’t use a library).

    Try these out at RegExr for example (but remind that it uses ActionScript regexes, may be different from Javascript ones sometimes, for example Javascript has no lookahead/lookbehind.

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

Sidebar

Related Questions

For a specific requirement in my project, I want to retrieve JSON response from
I have a html template that I want to retrieve from the resources file
In my project I want to get the size from the greatest homogeneous area
In my Delphi Project i want to have a 'Settings' button that when clicked,
I want to retrieve items from Fortress via its .NET API and load their
I want to retrieve rows from an oracle table and convert them into objects.
Im working on a small PHP project for learning purpose. i want to retrieve
I am using Kendo menu in my project. I want to retrieve id value
My project is implemented in Qt 4.7, and now I want to retrieve some
I'm developing for a project where HTML designers use PHP methods to retrieve content.

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.