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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:52:56+00:00 2026-05-27T00:52:56+00:00

I want to parse a web page and find specific patterns using regex on

  • 0

I want to parse a web page and find specific patterns using regex on Python.

My Example page have:

<input type="checkbox" name="some name....">
<input type="text", name="somemore name...">
<input type="radio" name="other name...">

And i want to find all matcihng name values of radio and checkbox inputs.

<input type="checkbox" name="(.*?)".*?>
<input type="radio" name="(.*?)".*?>

But i can not figure out how to combine these to regex to a single one?

EDIT: That question might switch to other directions. But it is better for me to tell what i want to do and is my choice of regex usage really suitable for that…

I must query a subscriber and get some basic info about the subscriber and a list of available loans and charges of the sbscriber. RElated module has many scripts that do that kind of job with regex. I also use SGMLparser for some part in my code. But i sometimes see SGML parser fails to parse HTML (did not dig it why it fails but basic reason is unexpected char type errors). So, i must be sure that i van either handle all type of HTML code, or keep on doing this by regex.

CONCLUSION: It is the best choice to use HTMLParser, and using regex is simple a verry bad idea… That is what i get from this question… But since the Question itself is more about regex matcihng then regex usage in thml, i decided to accept the answer abour regex…

  • 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-27T00:52:57+00:00Added an answer on May 27, 2026 at 12:52 am

    This?

    <input type="(?:checkbox|radio)" name="(.*?)".*?>
    

    While this works… It is not very robust…

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

Sidebar

Related Questions

I'm trying to parse a web page with the Python HTMLParser. I want to
I want to parse a web page in Groovy and extract all of the
I want to download and parse webpage using python, but to access it I
I want to parse a web page into my page, so i prefer AJAX
I have made a firefox extension which loads a web page using xmlhttprequest .
I want to convert a ASP.NET web page to pdf using ITextSharp. I did
I want to parse some HTML in order to find the values of some
I want to parse an Apache access.log file with a python program in a
I want to parse the input string and extract the values from it. My
I'm using WebClient.DownloadString(url) to download a web page, when a url a 404 web

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.