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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:46:27+00:00 2026-05-20T20:46:27+00:00

Hey, how do I match the url that starts with digits which are followed

  • 0

Hey, how do I match the url that starts with digits which are followed by “?fmt=json”, like 1234?fmt=json return true but my another wep handler which handles the urls that are all digits like 1234 return false? I have tried \d+(?!\?fmt=json) which is supposed match the url where the digits are not followed by “?fmt=json”, but it doesnt work. any helps? thank you

  • 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-20T20:46:28+00:00Added an answer on May 20, 2026 at 8:46 pm

    This regular expression only matches when the fmt=json suffix is there and will “return false” if only numbers:

    \d+\?fmt=json
    

    Like

    http://something/1234?fmt=json   == true, (match=1234?fmt=json)
    http://something/1234            == false
    

    See here in a regex tester

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

Sidebar

Related Questions

Hey all I am working on a json call that will implement Drupal's services
I'm trying to match substrings that are enclosed in %'s but preg_match_all seems to
Hey all I am attempting rename all files that match a certain pattern in
hey guys having this really simple problem but cant seem to figure out have
hey i followed a ruby on rails guide when i tried to run it
Hey guys I wanted to create a JScrollPane but it won't work... and I
Hey everyone, I have written a script that downloads a zip file from a
Hey someone know how can match this URI http://localhost:8080/test/user/127.0.0.1:8002:8 with @RequestMapping. I try to
Hey guys, I am trying to match address in this page - http://www.bbb.org/norfolk/business-reviews/tax-return-preparation/liberty-tax-service-in-virginia-beach-va-48000604 The
Hey all, i want to use a regular expression to match a word with

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.