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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:03:44+00:00 2026-06-01T02:03:44+00:00

http://www.foobar.com/foo/foo_bar.html?id=abc12A63768adv http://www.foobar.com/foo/foo_bar.html?id=gsdfcc6tfsdfgg http://www.foobar.com/foo/foo_bar.html?id={8765ABDV-8876-CR56-654A-ADD} These are the url pattern for which I have to write

  • 0
http://www.foobar.com/foo/foo_bar.html?id=abc12A63768adv
http://www.foobar.com/foo/foo_bar.html?id=gsdfcc6tfsdfgg
http://www.foobar.com/foo/foo_bar.html?id={8765ABDV-8876-CR56-654A-ADD}

These are the url pattern for which I have to write a regex.

re.compile('http://www.foobar.com/foo/foo_bar.html?id=+[a-zA-Z0-9-{}]+$')

But this is not working for me.

  • 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-01T02:03:47+00:00Added an answer on June 1, 2026 at 2:03 am

    You must escape (by prepending \) the ? else it will be interpreted as an “optional” flag for the preceding part of the regex. Then, you should escape the dots, else they will match any character.

    Then, you should move the - (dash) you are trying to match to the front of your [] list, so that the regex will be obviously including the dash and not using the dash as another range.

    Finally, you may wish to put ^ on the front so that you always match from the beginning, similar to how you used $ on the end.

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

Sidebar

Related Questions

I have a html string like this: <html><body><p>foo <a href='http://www.example.com'>bar</a> baz</p></body></html> I wish to
Input <html><body><p>foo <a href='http://www.example.com'>bar</a> baz</p></body></html> Output foo bar baz I know of htmldoc.DocumentNode.InnerText ,
I have a System.Uri, e.g., var uri = new Uri(http://www.domain.com/foo/bar); How do I get
Lets say my URL is: http://www.example.com/news/media-centre/news/17/an-example-news-post/?foo=bar I want to in PHP remove the last
http://www.bloomberg.com/markets/ has several figures that I would like to display on my html page.
I may have URLs like: http://193.198.112.125/foo/bar/ http://www.site.com/foo/bar/ http://193.198.112.125:4000/foo/bar/ and what I would like to
I have a line of text that looks like this foo bar http://www.example.com ->
Question: What ruleset do I need to do the following redirects: [1] http://www.xyzblog.com/foo/bar.php =>
I'm really new to regular expression. I have the following url: http://www.foo.bar.com/hgur_300x300.jpg and http://www.foo.bar.com/hgur_100x100.jpg
http://www.dorsetdesigns.co.uk/contact.html try the form it wont send a email to me. i am using

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.