• 0 Votes
    2 Posts
    2k Views
    guy038G

    Hello, Manorma Gautam,

    Not very difficult !

    From what you said, I deduced some points :

    You want to keep the lines, which contain, either, the string vprn OR vpls

    These two words begin by the two lowercase letters vp

    These two words are always located at beginning of lines

    All the lines, which do not contain these two words, must be deleted

    So, follow the few steps, below :

    Move back to the very beginning of your file ( Ctrl + Origin )

    Open the Replace dialog (Ctrl + H )

    In the Find what zone, type in (?-is)^(?!vp).+\R

    Leave the Repalce with zone EMPTY

    Uncheck, preferably, the Wrap around option

    Select the Regular expression search mode

    Click on the Replace All button

    Et voilà !

    NOTES :

    The first part of the regex are in-line modifiers (?-is) to force the regex engine to consider the search :

    In a non-insensitive way ( in the case you, previously, unchecked the March case option

    With the dot symbol matching standard characters, exclusively, in the case you, previously, checked the . matches newline** option

    The middle part ^(?!vp) looks, from beginning of each line, for a negative look-ahead ( a condition that must be true in order to satisfy the overall match but which is not part of the final regex. So, it verifies, for each line, if the exact string vp does NOT occur, at beginning of lines. If it’s the case :

    The last part, of this regex, .+\R matches any non-null range of standard characters, from beginning of line, followed by any kind of EOL characters. That is to say any complete line, which does NOT begin with vp

    All these complete lines are, of course, deleted, as the replacement part has been left EMPTY

    REMARK : The important thing, to note, is that look-arounds ( look-behinds and look-aheads ) do NOT move the regex engine position of search. So, after evaluating the negative look-ahead (?!vp) , the regex engine position is, still, just before the first character of each line ! Therefore, the part .+ does match all the standard characters of each line !

    Best Regards,

    guy038

  • Missing Plugin Manager

    Locked
    2
    0 Votes
    2 Posts
    8k Views
    dailD

    Quote from the Notepad++ website:

    Note that the most of plugins (including Plugin Manager) are not yet available in x64

  • Nptepad++ New Line Issue

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    Leon PriceL

    The Line Warp option fixed the problem for me, thanks for the help!

  • PHP styling keywords

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Where I can find the help?

    Locked
    2
  • Issue with automatic text replacement in v7.2.2

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    Dave GreenD

    Fair enough. However I’ve resolved it. Somewhere’s in the last few versions an option has been added to set files to Read only. I’ve never used this option before but yet during the update to 7.2.2 one of the files I use often had the flag set to read-only. That’s why my macro replacement program never worked. Once I cleared the flag my macro replacements are working fine again.

    Thanks for the reply.

  • Notepad++ seems to be stuck on Python27

    Locked
    4
    1 Votes
    4 Posts
    3k Views
    PeterJonesP

    Do you mean how to change Window’s PATH variable from pointing to Python27 to Python35? That’s a Windows question, not a Notepad++ question, and one that your original post implied you knew how to do. And 30seconds on your favorite search engine will tell you: search for “change path WindowsN” (where N is 7, 8, or 10, as appropriate for your machine).

    If you mean how to change the path in the command snippet I showed, instead of typing c:\path\to\python3.exe, you would type the actual path to your installation of python3. I cannot know where that is on your computer (though c:\python35\python.exe is my first guess)

    If you mean something else, you’ll have to be more explicit. Because, once again, you haven’t said how you previously ran python27 from NPP, and other than a copy/paste of my text, haven’t shown what you’ve tried to get python35 to work.

  • Parameter to Remove line numbers from Find results

    Locked
    4
    0 Votes
    4 Posts
    6k Views
    cmeriauxC

    Guys, it’s already implemented
    Do a right click and use “copy” built-in function.
    It’s different that “select all” and “copy” with accelerator key

  • unable to download plugin snippets in notepad++

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Multi-Editing doesn't work when I pressed "enter" button..

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Focus on opened file

    Locked
    5
    0 Votes
    5 Posts
    4k Views
    Harold CoenenH

    Good enough reason /me thinks ;-) lol

  • "Please reinstall NotepadStarter"

    Locked
    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Feature to switch clipboard text with highlited text.

    4
    0 Votes
    4 Posts
    2k Views
    Scott SumnerS

    @wessam-moustafa said:

    Just wondering whey didn’t you use “Editor.copyText(text) → int”

    No good reason for not using that function in this. I think I copied the more complex code from a script I had which was doing something a bit more complicated, and totally unnecessary for swapping clipboard and selected text. Thanks for pointing out the simplification!

  • Feature Request: Character Count

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Scott SumnerS

    @ibryant

    Go to the View menu. Select “View Summary…”. In the resulting popup will be “Characters (without blanks)” and a number representing the same for your document.

    The “blanks” it is referring to seems to be line-endings; it seems a better word could have been chosen rather than “blanks”.

  • Notepad++ does not install with knowledge of Python 3.5 Syntax.

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Create new file? dialog. How to disable prompt?

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • What's Regex syntax of "Replace with"?

    Locked
    4
    0 Votes
    4 Posts
    3k Views
    古旮

    Thank you very much!

  • Help with Basic Regular Expression Search

    Locked
    5
    0 Votes
    5 Posts
    3k Views
    dailD

    @Marshall-Medoff

    does this site have the equivalent of Karma or gold?

    I’m not really sure how the reddit system works. The reputation here doesn’t really have much value, I think mostly just to weed out spam accounts.

  • Convert Case to ...

    10
    0 Votes
    10 Posts
    32k Views
    Scott SumnerS

    @ortomind

    There is documentation on how to place search+replace in a macro, here: http://docs.notepad-plus-plus.org/index.php/Editing_Configuration_Files#Search_.2F_Replace_encoding

    That may be a bit cryptic, but here’s one example of many that can be found, that show how to implement a real use-case: https://notepad-plus-plus.org/community/topic/11735/notepad-macro-not-working-correctly/2

    You can adapt this example (which coincidentally also involves upper/lowercase manipulation!) for what you’re trying to do.

  • Rel not working

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied