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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:34:31+00:00 2026-05-29T05:34:31+00:00

I have definition string from my user to match an input string and i

  • 0

I have definition string from my user to match an input string and i would like to simplify the definition string so my user won’t need to know regexp internal.

my thought was to allow */-7721/-7722/-7723 to match any given 4 digit string which is not 7721 AND not 7722 AND not 7723.

I am searching for a regexp to perform the above on an input string which is a 4 digit number.

I have tried using the ?! notation, but it can’t mis-match the entire string.

(?![0-9]{4}) – this doesn’t allow any 4 digit string.

((?!(7721))(?!(7722))(?!(77223)) – this also didn’t work

Is there an AND operator to perform the above?

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-05-29T05:34:32+00:00Added an answer on May 29, 2026 at 5:34 am

    You forgot ^:

    ^(?!(?:7721))(?!(?:7722))(?!(?:7723))\d{4}
    

    Edited: added \d{4} for actually matching the string, not just testing

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

Sidebar

Related Questions

I have a definition like this def bar(self, foo=None, bar=None, baz=None): pass I want
In the database, I have a definition table that is read from the application
I have a macro definition in header file like this: // header.h ARRAY_SZ(a) =
If I have a service definition/implementation like this: using System; using System.ServiceModel; namespace aspace.service
I need show record from database. But I have a error: 'object' does not
I have the following string from a REST JSON response: [ { uid:10512213, name:Bob
I have a WinFrom App, use synchronous method to download string from a url,
Is it possible to define a spring-managed EJB3 hibernate listener? I have this definition
Lets say you have interface definition. That interface can be Operation . Then you
I have this working definition: IDENTIFIER [a-zA-Z][a-zA-Z0-9]* I don't want to keep repeating the

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.