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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:13:04+00:00 2026-06-13T11:13:04+00:00

My question is how do you regex something that is NOT what my current

  • 0

My question is how do you regex something that is NOT what my current regex is.

My regex is: 9\d\d\d\d\d\d\d\d\d

I’m trying to find 10 digit numbers that start with 9.
But now I want to find, those who are opposite to this.

How do i do that? I’m trying to use it with notepad++ regex, find those who are not 10 digit and doest start with 9, and delete them.

I need to delete: everything, regardless of numbers of digits as long as its not 10 digit and doesnt start with 9.

Thank you.

I have a long file that looks like this,

 905664572
 9055148
 9052836956
 9054950806
 9059105646
 905403434
 905654765
 9058618018
 90547214

where i need to get rid of all that is not 10 digit.

while using notepad++

this regex works: 9\d\d\d\d\d\d\d\d\d

this regex doesn’t: 9\d{9} AND ^9(\d{0,9}


This worked to what I was trying to do:

 (?<!\d)[0-9](\d{0,8})
  • 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-13T11:13:05+00:00Added an answer on June 13, 2026 at 11:13 am

    Your regex is 9\d\d\d\d\d\d\d\d\d and could be shortened to 9\d{9} …

    Well, the opposite could be (?!9\d\d\d\d\d\d\d\d\d) or (?!9\d{9}) or 9(?>!\d{9})

    edit:
    the working express: (?<!\d)9(\d{0,8}|\d{10,})(?=\D)

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

Sidebar

Related Questions

I had a quick question regarding RegEx... I have a string that looks something
Just a quick regex question...hopefully I have a string that looks something like this:
I'm trying to use a regular expression to find all substrings that start with
I'm trying to build a tool that uses something like regexes to find patterns
This might not be quite the question you're expecting! I don't want a regex
Another noob regex problem/question. I'm probably doing something silly so I thought I'd exploit
Another RegEx question for a search I'm trying to do. The Problem : Determine
Possible Duplicate: Regex question mark I am trying to figure out how to parse
Question: Is is possible, with regex, to match a word that contains the same
Not quite sure if it is ok to do this but, my question is:

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.