• // Javascript files don't show even background in ver. 7.7 //

    12
    0 Votes
    12 Posts
    670 Views
    PeterJonesP

    @Ricardo-E-Trelles-0 ,

    If you don’t like the background, change the default background. I’ve pointed you to the setting multiple times.

  • How to remove characters () and text inside

    7
    0 Votes
    7 Posts
    3k Views
    DrewD

    @PeterJones

    Thank you so much! Yes it works.
    I chose to find: (<tag>.*)\(.*\)(</tag>)
    And replace with: \1\2 or $1$2
    Checkmark regular expressions

  • find and replace find numeric value and replace

    2
    0 Votes
    2 Posts
    281 Views
    PeterJonesP

    @Venkat-Ramani ,

    You will have to re-phrase with a complete question. You appear to want to replace something with something else, but do not do a good job with explaining the before and after. Please read the boilerplate I am attaching, as it will help you understand how to better ask the question and better format the question, plus link to documentation that will help you learn how to figure this out yourself.

    If you show a willingness to learn, and to help us help you, by replying in a way that shows you read and understood my recommendations below, you are likely to get good help. Otherwise, I wish you the best of luck.

    ----

    Do you want regex search/replace help? Then please be patient and polite, show some effort, and be willing to learn; answer questions and requests for clarification that are made of you. All example text should be marked as plain text using the </> toolbar button or manual Markdown syntax; screenshots can be pasted from the clipboard to your post using Ctrl+V. Show the data you have and the text you want to get from that data; include examples of things that should match and be transformed, and things that don’t match and should be left alone; show edge cases and make sure you examples are as varied as your real data. Show the regex you already tried, and why you thought it should work; tell us what’s wrong with what you do get… Read the official NPP Searching / Regex docs and the forum’s Regular Expression FAQ. If you follow these guidelines, you’re much more likely to get helpful replies that solve your problem in the shortest number of tries.

  • replace some text inside the quotes

    9
    0 Votes
    9 Posts
    3k Views
    guy038G

    Hello, @vivianjenylord and All,

    Some explanations on this regex S/R :

    The part \.\w+ searches a literal dot character, followed with a non-null range of word chars…

    But ONLY IF  the condition inside the look-ahead is True. That is to say if, further on, in current line, a colon followed with a second non-null range of word chars, stored as group1 as embedded in parentheses, can be found

    In replacement, we rewrite a dot, followed with the contents of group1 ( the country name )

    Cheers,

    guy038

  • Something got changed, how do I revert it

    13
    0 Votes
    13 Posts
    1k Views
    EkopalypseE

    @romanml71 said in Something got changed, how do I revert it:

    However, not all plugins are in both places. nppcalc.dll was only in C:\ProgramFiles(x86)…

    I guess this could be if some older installation was updated with a much newer version.
    My understand it is that as long as Local Conf mode : OFF is set,
    the configuration, plugins … will be read from %APPDATA% and in case
    of Local Conf mode : ON npp is looking to the directories next to its executable.

  • file open/save as menus always are full screen version

    2
    0 Votes
    2 Posts
    583 Views
    EkopalypseE

    @Douglas-Kaynor

    Normally a double click in the title bar should restore it to be able to resize it.

  • explorer.dll. The specified module could not be found.

    34
    0 Votes
    34 Posts
    4k Views
    Carlos ZhangC

    @Carlos-Zhang said in explorer.dll. The specified module could not be found.:

    Plugins > Open Plugins Folder: Nothing happened. File Manager did not open.

    I also fixed this by this page:
    https://support.microsoft.com/en-us/help/929833/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system
    FYI.

  • I want to cut a specific range

    6
    0 Votes
    6 Posts
    4k Views
    guy038G

    Hello, @김성찬 and All,

    An other and easy solution is to use the Begin/End Select feature !

    1 Left click at the very beginning of the first line 0000 90 9F 33 .. .. .., to move the caret to this location

    2 Select the option Edit > Begin/End Select

    3 Use the Ctrl + End shortcut to get the very end of your hexadecimal dump text

    4 Press and hold down the ALT key and left click after the 16th hexadecimal byte of the last line

    5 Select, again, the option Edit > Begin/End Select

    => After a while, needed to process 400,000 lines about, as you said, you should notice this big rectangular selection !

    6 Simply, press the Delete key

    Voila :-))

    Best Regards,

    guy038

    P.S. :

    If you forget to hold down the ALT key, at step 4 of the method above, you, obviously, get a normal selection of all your text !

  • Syncing unread files between cloud synced devices

    6
    0 Votes
    6 Posts
    2k Views
    EkopalypseE

    @PeterJones

    f355847c-96d5-416f-9554-5fdb80611ff0-image.png

  • Keyword prefix constraint possible ?

    11
    0 Votes
    11 Posts
    518 Views
    EkopalypseE

    @Klasen-Eric

    So my understanding is, that you run it once, right?
    And after executing you got your main print statement in the console, correct?
    After that, you need to activate the buffer aka clicking into it or switching
    from another document into the one which should be handled and then
    it should start coloring your regex matches.
    Did you ensure that the match group is 0? Only if you used G\d+.
    If you used something like
    G0(\d+) and you are interested to get the digit colored which follow G0
    you would need to use match group 1.
    So for example this

    regexes[(0, (79, 175, 239))] = (r'G\d+', 1)'

    would be an error as no match group 1 gets created

    either use this

    regexes[(0, (79, 175, 239))] = (r'G\d+', 0)'

    or that (which really doesn’t make sense in this case but …

    regexes[(0, (79, 175, 239))] = (r'(G\d+)', 1)'
  • I want to sort text phrases by their number of words

    5
    0 Votes
    5 Posts
    510 Views
    guy038G

    Hi, @thunderdog, @peterjones and All,

    Peter, nice shot , too ! As a sort was necessary, I simply thought about a second regex S/R. But you’re right, we can perfectly use a composite regex to get all the job done ;-))

    So, the road map is :

    Perform the regex S/R, twice

    Run the alphabetic ( Unicode ) ascending sort

    Perform the same regex S/R, once again

    Note that I also slightly shorten your search regex ! Here is the final solution :

    Assuming the initial text of @PeterJones, normalized in two lines, which does end with either a dot, an exclamation mark or an question mark !

    The day was very difficult today. I hope the next few days get better. Do you hope the same? I hope you hope the same as me! Hello, world! This sentence is just ten teeny-tiny words long, silly goose! No?

    SEARCH (?-s)^#+\t(.+)#$|\w+[^\w\r\n]*(?=.*\t)|\h*(.+?[.?!])(?!#)

    REPLACE ?2\2\t\2#\r\n:?1\1:#

    After two clicks on the Replace All button, we obtain :

    ###### The day was very difficult today.# ######## I hope the next few days get better.# ##### Do you hope the same?# ######## I hope you hope the same as me!# ## Hello, world!# ########### This sentence is just ten teeny-tiny words long, silly goose!# # No?#

    Now, we click on the Edit > Line Operations > Sort Lines Lexicographically Ascending option and get :

    # No?# ## Hello, world!# ##### Do you hope the same?# ###### The day was very difficult today.# ######## I hope the next few days get better.# ######## I hope you hope the same as me!# ########### This sentence is just ten teeny-tiny words long, silly goose!#

    Let’s go back to fhe Replace dialog , again and use the same S/R

    SEARCH (?-s)^#+\t(.+)#$|\w+[^\w\r\n]*(?=.*\t)|\h*(.+?[.?!])(?!#)

    REPLACE ?2\2\t\2#\r\n:?1\1:#

    After one final click on the Replace All button, here is your expected text :

    No? Hello, world! Do you hope the same? The day was very difficult today. I hope the next few days get better. I hope you hope the same as me! This sentence is just ten teeny-tiny words long, silly goose!

    Wow… Awesome !

    And if we want to get all that text in a single paragraph, just apply this last regex S/R !

    SEARCH ^\R|(\R)

    REPLACE ?1\x20

    giving :

    No? Hello, world! Do you hope the same? The day was very difficult today. I hope the next few days get better. I hope you hope the same as me! This sentence is just ten teeny-tiny words long, silly goose!

    Best Regards,

    guy038

  • Action on current selection

    9
    1 Votes
    9 Posts
    1k Views
    Alan KilbornA

    @asvc

    Security is indeed an important concern in current and future times.
    Perhaps you should not use Notepad++ at all, unless/until all possible holes in Notepad++ and Windows are addressed.

  • How to replace intrementally?

    25
    0 Votes
    25 Posts
    4k Views
    guy038G

    Hello, @alan-kilborn,

    Of course, it’s been more than 25 years since I really practice AWK. It was on an HP-Unix server that would be laughed at, nowadays !

    I have already praised, several times, the precision and power of regexes, which, in a few words, produce great effects !

    For the same reasons, it seems that I am simply impressed by the AWK language ;-))

    Cheers,

    guy038

  • Character II

    7
    0 Votes
    7 Posts
    1k Views
    Alan KilbornA

    @dail said in Character II:

    My personal rule any more is I’ll usually put in as much effort as the person I’m replying to. :)

    That’s an extremely reasonable criterion.
    A lot of postings would go unanswered, though. :-)

  • VIM-like search

    8
    0 Votes
    8 Posts
    648 Views
    asvcA

    @Ekopalypse, thanks. Let’s continue in the main topic ?

  • 0 Votes
    6 Posts
    2k Views
    guy038G

    Hi, @banjo-g, @alan-kilborn and All,

    A generic and general form of the regex, described in my previous post, could be :

    SEARCH (?-is)^.*?Expression A(?s).*?Expression B.*?$\R

    Basically, this regex :

    Searches for two lines :

    A line A, containing Expression A, at any location of line A

    A line B, containing Expression B, at any location of line B

    Selects all range of characters, generally multi-lines, from the beginning of line A till the end of line B, with its EOL characters

    The lines A and B may be identical. However, in that case, Expression B must be located after Expression A, in current line !

    Notes :

    First, the in-line modifier (?-is)

    Carries a non-insensitive search ( so sensitive to case )

    Forces the regex engine to interpret the regex dot symbol . as matching a single standard character ( not EOL ones )

    Then, the part ^.*?Expression A matches, from beginnning of line, the shortest range, possibly null, of standard characters, followed by Expression A, with that exact case

    Now, the part (?s).*?Expression B looks for the shortest range, possibly null, of characters, including EOL, followed by Expression B, with that exact case

    Finally, the part .*?$\R searches for the shortest range, possibly null, of characters till an end of line, followed with its line-break

    Cheers,

    guy038

  • How to update Notepad++ via Zip/7z without losing your settings

    2
    0 Votes
    2 Posts
    388 Views
    EkopalypseE

    @Lifthil_

    I use two batch scripts like described here.

  • Replacing number with another Incrementing #

    18
    0 Votes
    18 Posts
    13k Views
    astrosofistaA

    @Alan-Kilborn

    May it be, mine was just a disclaimer, as I know almost nothing about Python :)

  • Double click no longer opening links. Newest version

    2
    0 Votes
    2 Posts
    576 Views
    PeterJonesP

    @Justin-Hess-0 ,

    I cannot replicate your problem. I am using v7.8.6, with ? > Debug Info =

    Notepad++ v7.8.6 (64-bit) Build time : Apr 21 2020 - 15:23:03 Path : C:\usr\local\apps\notepad++\notepad++.exe Admin mode : OFF Local Conf mode : ON OS Name : Windows 10 Enterprise (64-bit) OS Version : 1903 OS Build : 18362.720 Plugins : ComparePlugin.dll LuaScript.dll MarkdownViewerPlusPlus.dll mimeTools.dll NppConsole.dll NppConverter.dll NppEditorConfig.dll NppExec.dll NppExport.dll NppFTP.dll PreviewHTML.dll PythonScript.dll QuickText.dll XMLTools.dll

    dd7c7adf-9952-4528-a8d6-62d30249c6a4-image.png

    I have Chrome as my default browser.

    When I double-click on a link, it opens that link in Chrome.

    Maybe you should try turning off Clickable Link Settings, exit all instances of Notepad++, run one instance of Notepad++, enable the setting again, and see if it works. Then exit and run again and make sure it still works.

    If it doesn’t work for you, you will have to give us more information, including the ? menu Debug Info, like I showed above.

  • Recognise the PDB/CIF file for the protein structures from RCSB website

    3
    0 Votes
    3 Posts
    517 Views
    Tullio FotiT

    You can try to create a UDL definition for PDB file format.
    However PDB is not a programming language so I tried to use the comment folding to achieve your need.
    Create a file pdb.xml (as below) and put it in userDefineLangs folder

    <NotepadPlus> <UserLang name="PDB Protein Data Bank" ext="pdb" udlVersion="2.1"> <Settings> <Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="1" decimalSeparator="0" /> <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="yes" Keywords6="no" Keywords7="no" Keywords8="no" /> </Settings> <KeywordLists> <Keywords name="Comments">00SOURCE 00REMARK 00HELIX 00SEQRES 00ATOM 00SHEET 01 02 03 04</Keywords> <Keywords name="Numbers, prefix1"></Keywords> <Keywords name="Numbers, prefix2"></Keywords> <Keywords name="Numbers, extras1"></Keywords> <Keywords name="Numbers, extras2"></Keywords> <Keywords name="Numbers, suffix1"></Keywords> <Keywords name="Numbers, suffix2"></Keywords> <Keywords name="Numbers, range"></Keywords> <Keywords name="Operators1"></Keywords> <Keywords name="Operators2"></Keywords> <Keywords name="Folders in code1, open"></Keywords> <Keywords name="Folders in code1, middle"></Keywords> <Keywords name="Folders in code1, close"></Keywords> <Keywords name="Folders in code2, open"></Keywords> <Keywords name="Folders in code2, middle"></Keywords> <Keywords name="Folders in code2, close"></Keywords> <Keywords name="Folders in comment, open"></Keywords> <Keywords name="Folders in comment, middle"></Keywords> <Keywords name="Folders in comment, close"></Keywords> <Keywords name="Keywords1">HEADER KEYWDS </Keywords> <Keywords name="Keywords2">TITLE KEYWDS REVDAT AUTHOR CISPEP COMPND DBREF</Keywords> <Keywords name="Keywords3">ALA ARG ASN ASP CYS GLN GLU GLY HIS ILE LEU LYS MET PHE PRO SER THR TRP TYR VAL</Keywords> <Keywords name="Keywords4">EXPDTA JRNL</Keywords> <Keywords name="Keywords5">ORIGX SCALE CRYST </Keywords> <Keywords name="Keywords6"></Keywords> <Keywords name="Keywords7"></Keywords> <Keywords name="Keywords8"></Keywords> <Keywords name="Delimiters"></Keywords> </KeywordLists> <Styles> <WordsStyle name="DEFAULT" fgColor="FFFFFF" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="COMMENTS" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="LINE COMMENTS" fgColor="FFFFFF" bgColor="000000" fontStyle="0" nesting="67369984" /> <WordsStyle name="NUMBERS" fgColor="00FFFF" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS1" fgColor="FF0000" bgColor="400000" fontStyle="1" nesting="0" /> <WordsStyle name="KEYWORDS2" fgColor="00FF80" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS3" fgColor="FFFF80" bgColor="000000" fontStyle="1" nesting="0" /> <WordsStyle name="KEYWORDS4" fgColor="C0C0C0" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS5" fgColor="00FF80" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS7" fgColor="FF0080" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN CODE2" fgColor="FF8040" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN COMMENT" fgColor="FF8040" bgColor="000000" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> </Styles> </UserLang> </NotepadPlus>