• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

216
Views
What is the best method to copy all matching text from a web page?

Background I have a live web dashboard for ticket numbers and their status updates. Each update and case number are in separate rows on this web page. To make this dashboard useful, I have to save it as offline HTML and import it into excel to copy one row of data like all case numbers.

Goal How do I search for a matching string on a page and copy all to clipboard in separate lines? EG, all my case numbers match the first two digits like “12.......” If I can manage to figure that out, I can make use of text in tools easier like Trello etc.

almost 3 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You could do something like this with Python:

import re
import requests

text = input("Enter text: ")

url = requests.get('https://stackoverflow.com/questions/69691849/what-is-the-best-method-to-copy-all-matching-text-from-a-web-page').text
page = re.findall(text, url)

for i in page:
    print(i)

I don't think you'd be able to copy all the output, however you could just copy the output from command prompt. It's unclear what you are trying to fully achieve here.

Output:

Output with array ( print(page) ):

almost 3 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error