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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:38:51+00:00 2026-06-03T07:38:51+00:00

I am writing an HTTP request tutorial for beginners. I have code that looks

  • 0

I am writing an HTTP request tutorial for beginners. I have code that looks like:

import requests
r = requests.get('http://xxx.com/yy/zzz?a=1&b=2', auth=('1234', '5678'))
r.text

I would like to use jQuery to dynamically select the `?a=1&b=2~ snippet of code and highlight it (because those values are dynamic and depend on what the user types in).

Is there a way to do a jQuery select that matches a regex?

Unfortunately I can not wrap that area in a special span to select it that way.

Thanks!

  • 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-03T07:38:52+00:00Added an answer on June 3, 2026 at 7:38 am

    You could achieve this by using the element that contains the code sample, which I assume you’ve put in a <pre> or <code> block. Then you can just grab all of the html contents of it, and use a regular string replace to add in any additional HTML elements you might need.

    Here is jsFiddle Example which has the code you provided in a <pre> tag and adds a span around the query string.

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

Sidebar

Related Questions

I am writing some documentation and I have a little vocabulary problem: http://www.example.com/en/public/img/logo.gif is
I've followed this tutorial: http://anandhansubbiah.com/blog/writing-your-first-android-application/ , but no matter what I do, and what
I'm writing a web server, and I'd like to know what HTTP request headers
I am writing client software that initiates a HTTP request with a large blob
I have a string containing XML data that is returned from an http request.
I'm writing http session manager (gen_server based). That server creates and removes session from
I am writing http server that can serve big files to client. While writing
I began writing an app using declarative_authorization ( http://github.com/stffn/declarative_authorization ) but I'm now wondering
I'm writing an aspx page which has to send an http request to a
I have an API in NETMF C# that I am writing that includes a

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.