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

  • Home
  • SEARCH
  • 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 4239424
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:02:00+00:00 2026-05-21T03:02:00+00:00

I have a requirement to match all the incoming requests and filter out certain

  • 0

I have a requirement to match all the incoming requests and filter out certain requests based on request URL. Currently I’m trying to use a regular expression like /app/webapp/users/*/resource/path to match /app/webapp/users/<some_user_id>/resource/path. But the none of the incoming requests seem to match the regex. What is the problem with the regex I’m trying to use? (I’m using String class’ matches method to do the comparison).

  • 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-05-21T03:02:01+00:00Added an answer on May 21, 2026 at 3:02 am

    /*/ looks more like a glob than a regex to me. That will match any number of slashes, whereas I expect you want it to match any number of characters between the slashes. Try /.+/ instead, or possibly /[^/]+/ if you want to make it only match a single level (i.e. if /app/webapp/users/foo/bar/baz/resource/path shouldn’t match).

    EDIT: As Joachim mentioned, another way of only matching a single level is to use /.+?/ to make it a “reluctant” match.

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

Sidebar

Related Questions

I have a simple requirement. We use the hibernate validation engine to figure out
I currently have a requirement where I need to validate that all the files
I have requirement as following like showing ABPeoplePickerNavigationController in tabbar based application. I researched
I'm trying to decide on whether to primarily use floats or ints for all
I have a (badly specified) requirement that I recognize certain keywords, but there is
I have a requirement where I need to match text like testuser or joeperson
I have a requirement to match U.S. postal addresses during an import process. The
I'm trying to figure out a way to make three floating divs match the
I have requirement where some times I would like to load children as well
I have requirement to disable copy/paste/cut operations on a textbox. For this purpose I

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.