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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:47:53+00:00 2026-06-15T16:47:53+00:00

How to match a URL like: http://www.example.com/foo/:id/bar http://www.example.com/foo/1/bar http://www.example.com/foo/999/bar stub_request(:post, www.example.com)

  • 0

How to match a URL like:

http://www.example.com/foo/:id/bar
http://www.example.com/foo/1/bar
http://www.example.com/foo/999/bar

stub_request(:post, “www.example.com”)

  • 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-15T16:47:54+00:00Added an answer on June 15, 2026 at 4:47 pm

    http://www\..*?\.com/foo/\d+/bar should work for you.

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

Sidebar

Related Questions

http://www.example.com/books?_pop=mheader What would be the regular expression to match this and any URL that
I need to rewrite URL like http://www.example.com/search.php?abc to http://www.example.com/abc using the rules below, but
I need to match a image url like this: http://site.com/site.com/files/images/img (5).jpg Something like this
If I have a URL that is http://www.example.com/sites/dir/index.html , I would want to extract
My current query (doesn't work) SELECT url FROM table WHERE 'http://www.longurl.com/some/string' like '%' .
I am using Beautiful Soup in Python. Here is an example URL: http://www.locationary.com/place/en/US/Ohio/Middletown/McDonald%27s-p1013254580.jsp In
I got this url for example http://www.yellowpages.com/manhattan-beach-ca/mip/marriott-manhattan-beach-4933923?lid=185795402 I want to get the last digit
I want to find URL like following with preg_match. http://www.website.com/THE_ID_WHICH_I_WANT/RANDOM_CHARACTERS_AND_NUMBERS.RANDOM_SOMETHING.html This is how far
I have a very large set of string URL patterns like {http://www.imdb.com, http://www.amazon.com ,...}
So basically I have a very long url, something like this - http://www.site.com/wp-content/themes/theme/timthumb.php?src=/wp-content/uploads/2012/random-image-name.jpg&w=650&h=0&zc=1&q=100 and

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.