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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:43:53+00:00 2026-06-04T08:43:53+00:00

Possible Duplicate: notepad++ Inverse Regex replace (all but string) Let’s say I have the

  • 0

Possible Duplicate:
notepad++ Inverse Regex replace (all but string)

Let’s say I have the following …

http://whateverurl.com/is-not-wanted-but-it-is-here-anyway
http://icantbelieveibeenonthisallday.com/i-want-to-shoot-myself
http://hereiswhatireallywant.net/hey-there-sweet-thang
http://howsithangingloser.org/i-hope-someone-helps-you
http://heresanotherbeauty.net/that-i-want-to-be-all-up-in

I want to find only the lines that DON’T contain “.net/”, so I can then replace it with nothing, hence delete.

I searched online and this site and found the (?!xxx) string,
so I was trying to do the (?!.net/)
but it seems that Notepad++ doesn’t support that string
or I may be using it wrong since I’m new to RegEx.

Can anyone tell me how to find a line that excludes a certain string of characters in Notepad++ ?

  • 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-04T08:43:55+00:00Added an answer on June 4, 2026 at 8:43 am

    As far as I can tell, Notepad++’s regex support doesn’t let you actually capture the newline character. You are better off using this regex:

    ^.*\.net.*$
    

    Replace it with nothing (now it is a blank line), then change the Search Mode to extended and replace \r\n\r\n with \r\n (or \n\n with \n if using Unix style line endings).

    BoltClock pointed out that I am behind times, and that version 6 supports this. You can use this regex to find those lines and remove them:

    ^.*\.net.*(\r\n|$)
    

    EDIT:

    I appreciate your response, but you misunderstood what I said. I’m trying to find lines that DO NOT CONTAIN the .net/ to delete them. Can it be done?

    Whoops. If you want to match lines that do not have .net in them, use this expression:

    ^(?!.*?\.net/).*\r\n
    

    Works in Notepad++ 6.

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

Sidebar

Related Questions

Possible Duplicate: regex for URL including query string I have a text or message.
Possible Duplicate: When do you use the “this” keyword? If I have the following
Possible Duplicate: VS2005 Winforms Designer Exception Screen and IE8 All of the sudden, visual
Possible Duplicate: PHP get all arguments as array? Within a javascript function arguments always
Possible Duplicate: How to call a JavaScript function from PHP? I have a php
Possible Duplicate: Extracting dollar amounts from existing sql data? I have a column in
Possible Duplicate: std::string and its automatic memory resizing I am just curious, how are
Possible Duplicate: Matlab gives wrong answer Can anyone explain to me why the following
Possible Duplicate: Unload a module in Python After importing Numpy, lets say I want
Possible Duplicate: git - removing a file from source control (but not from 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.