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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:14:55+00:00 2026-05-10T15:14:55+00:00

I want to grab the value of a hidden input field in HTML. <input

  • 0

I want to grab the value of a hidden input field in HTML.

<input type='hidden' name='fooId' value='12-3456789-1111111111' /> 

I want to write a regular expression in Python that will return the value of fooId, given that I know the line in the HTML follows the format

<input type='hidden' name='fooId' value='**[id is here]**' /> 

Can someone provide an example in Python to parse the HTML for the value?

  • 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. 2026-05-10T15:14:55+00:00Added an answer on May 10, 2026 at 3:14 pm

    For this particular case, BeautifulSoup is harder to write than a regex, but it is much more robust… I’m just contributing with the BeautifulSoup example, given that you already know which regexp to use 🙂

    from BeautifulSoup import BeautifulSoup  #Or retrieve it from the web, etc.  html_data = open('/yourwebsite/page.html','r').read()  #Create the soup object from the HTML data soup = BeautifulSoup(html_data) fooId = soup.find('input',name='fooId',type='hidden') #Find the proper tag value = fooId.attrs[2][1] #The value of the third attribute of the desired tag                            #or index it directly via fooId['value'] 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<select name=gamelist id=gamelist> <option value=1>Backgammon</option> <option value=2>Chess</option> </select> <input type=submit name=submit id=submit value=Submit />
I have a php page with the following: echo <form method='post'><input type='hidden' id='memberIdd' name='memberIdd'
I want to grab a particular column value a.id and store it into a
I want to grab from a db a record with name='John Doe'. I'd like
I am having trouble accessing the value of an HTML Input element using jQuery,
Sample text = legacycard.ashx?save=false&iNo=3&No=555 Sample pattern = ^legacycard.ashx(.*)No=(\d+) Want to grab group #2 value
My mark up <form action=blah/foo method=POST id=frm1> <input type=hidden id=v /> </form> ...... ......
I want my application to grab the value of a ComboBox and then to
I often want to grab one field from one table. So I do this:
My goal is to have input field that will take value of whats was

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.