• 1 Votes
    11 Posts
    1k Views
    EkopalypseE

    @MK-Digital
    Whether it is in appdata or not depends on how you installed npp and
    whether you are using the doLocalConf.xml or not.

  • I have problem

    2
    0 Votes
    2 Posts
    100 Views
    PeterJonesP

    @Abdul-Basit ,

    This FAQ might help you get started. Good luck.

  • Please help me a with a regex replacement formula

    12
    0 Votes
    12 Posts
    410 Views
    Mantelis TelisM

    @guy038 hello :)

    okay first since I tried to replace tabulation character - \t - but the notepad++ does not register the find so I had to leave it as it was.

    Regarding the remark - its okay the stuff I’m fixing is not in English language so I simply translated this small part to english in case it would be easier to understand for everyone though it bears no meaning withtout more context. :)

    I think this thing worked for me in the end. I see no errors on the database so far.

    Will get into youtube video code embedding replacement next which is a bit different than this query. Will ask for help later. :) Thanks for everybody involved.

  • Crashing when accessing Files browser

    2
    0 Votes
    2 Posts
    220 Views
    cmeriauxC

    @IgnorantKnight debug info please ?
    Try out with latest version
    Try out with portable version
    Try out without plugins

  • convert lower to upper and upper to lower aftert colon

    12
    1 Votes
    12 Posts
    2k Views
    guy038G

    Hi, @real_1bx, and All,

    This time, due to the simultaneous search of an entire line, with its line-break, when a digit follows the colon char, we need, again, two groups, leading up to that regex S/R :

    SEARCH (?-is)^.+:\d.+\R|((:[A-Z])|:[a-z])

    REPLACE ?1(?2\L:\U)\1

    For instance, the input text, below :

    john:abC232 john:13kkmsd smith:SnLf1999

    would be modified as :

    john:AbC232 smith:snLf1999

    Best regards,

    guy038

  • Delete all duplicates words in the text

    3
    0 Votes
    3 Posts
    330 Views
    guy038G

    Hi, @сергій-бородін and All,

    Thinking back on your problem, here is a second method, requiring fewer steps, but which will classify each non-duplicated tag, according to a different layout !

    So, assuming the same initial text, below :

    filename1.eps,tag1;tag2;tag3 filename2.eps,tag4;tag1;tag5 filename3.eps,tag6;tag2;tag9 filename3.eps,tag7;tag2;tag3;tag8 filename4.eps,tag1;tag9;tag5 filename5.eps,tag4;tag6;tag10;tag12 filename5.eps,tag8;tag2;tag1;tag6;tag11 filename6.eps,tag3;tag2;tag3;tag10;tag14 filename7.eps,tag5;tag7;tag15 filename8.eps,tag4;tag5;tag15;tag16 filename8.eps,tag3;tag14;tag9;tag7 filename8.eps,tag7;tag2;tag3;tag8 filename9.eps,tag2;tag10;tag17 filename10.eps,tag5;tag1;tag13 filename10.eps,tag7;tag6;tag9;tag10 filename11.eps,tag7;tag2;tag3;tag8;tag18 filename11.eps,tag10;tag12;tag13;tag20 filename12.eps,tag4;tag8;tag3;tag19 filename13.eps,tag6;tag15;tag9;tag11 filename14.eps,tag7;tag2;tag3;tag17;tag12;tag4 filename15.eps,tag0;tag9,tag20

    First this simple regex S/R, changes all this list in a one-line list :

    Open the Replace dialog ( Ctrl + H )

    SEARCH \R

    REPLACE # ( Any symbol, not used yet, can be chosen )

    Select the Regular expression search mode

    Click on the Replace All button

    Which gives the single line, below :

    filename1.eps,tag1;tag2;tag3#filename2.eps,tag4;tag1;tag5#filename3.eps,tag6;tag2;tag9#filename3.eps,tag7;tag2;tag3;tag8#filename4.eps,tag1;tag9;tag5#filename5.eps,tag4;tag6;tag10;tag12#filename5.eps,tag8;tag2;tag1;tag6;tag11#filename6.eps,tag3;tag2;tag3;tag10;tag14#filename7.eps,tag5;tag7;tag15#filename8.eps,tag4;tag5;tag15;tag16#filename8.eps,tag3;tag14;tag9;tag7#filename8.eps,tag7;tag2;tag3;tag8#filename9.eps,tag2;tag10;tag17#filename10.eps,tag5;tag1;tag13#filename10.eps,tag7;tag6;tag9;tag10#filename11.eps,tag7;tag2;tag3;tag8;tag18#filename11.eps,tag10;tag12;tag13;tag20#filename12.eps,tag4;tag8;tag3;tag19#filename13.eps,tag6;tag15;tag9;tag11#filename14.eps,tag7;tag2;tag3;tag17;tag12;tag4#filename15.eps,tag0;tag9,tag20

    Now, here is the regex S/R, which deletes any duplicated tag ( The same regex, described in my previous post ) :

    SEARCH (?-is)[,;](\w+)(?=[,;#].*?[,;]\1([,;#]|\R|\z))

    REPLACE Leave the zone EMPTY

    Your text should be shortened as below :

    filename1.eps#filename2.eps#filename3.eps#filename3.eps#filename4.eps#filename5.eps#filename5.eps#filename6.eps#filename7.eps#filename8.eps;tag16#filename8.eps;tag14#filename8.eps#filename9.eps#filename10.eps,tag5;tag1#filename10.eps#filename11.eps;tag18#filename11.eps,tag10;tag13#filename12.eps;tag8;tag19#filename13.eps,tag6;tag15;tag11#filename14.eps,tag7;tag2;tag3;tag17;tag12;tag4#filename15.eps,tag0;tag9,tag20

    Finally, this regex S/R, below :

    Replaces any semi-colon, right after the string eps with a comma

    Replaces any # symbol with a line-break ( \r\n or \n )

    SEARCH eps;|(#)

    REPLACE ?1\r\n:eps,    OR    ?1\n:eps, if you works with an Unix file

    And we obtain the final output :

    filename1.eps filename2.eps filename3.eps filename3.eps filename4.eps filename5.eps filename5.eps filename6.eps filename7.eps filename8.eps,tag16 filename8.eps,tag14 filename8.eps filename9.eps filename10.eps,tag5;tag1 filename10.eps filename11.eps,tag18 filename11.eps,tag10;tag13 filename12.eps,tag8;tag19 filename13.eps,tag6;tag15;tag11 filename14.eps,tag7;tag2;tag3;tag17;tag12;tag4 filename15.eps,tag0;tag9,tag20

    As you can see, the 21 non-duplicated tags ( From tag0 to tag20 ) are arranged differently, with many lines without tag, at beginning of the list !

    Best Regards,

    guy038

  • Function list for user defined language

    7
    0 Votes
    7 Posts
    2k Views
    MAPJe71M

    Maybe FAQ Desk: Function List Basics will give you some ideas.

  • File Type issue

    6
    0 Votes
    6 Posts
    4k Views
    RunkelikunkkuR

    @Jeffrey-Snively said in File Type issue:

    Now I have a different problem. With some file types (including .txt), when I go Right-click>Open With>Choose Default Program, it gives me the option to select NPP. I select it and check the “Always use this program” box. Then when I look in Windows explorer, it shows the file type for all my .txt documents as “Notepad++ Document” instead of “.txt file” or something.

    Old thread but I had same issue and this was the top google result so maybe this will help someone in future. Open regedit, go to “HKEY_CLASSES_ROOT\Notepad++_file”, instead of “Notepad++ Document” leave the description empty and reboot your PC. Thanks for someone over at SU providing this.

  • I need help to remove a string

    3
    0 Votes
    3 Posts
    188 Views
    PeterJonesP

    On re-reading, I saw a fine point I may have missed: if you only want to delete parenthesized items when it starts with (tstamp, then slight change:

    FIND = \(tstamp.*?\)

    The rest remains the same.

    With this,

    (blah keep this) (tstamp blah blah) (blah keep this)

    will become

    (blah keep this) (blah keep this)

    If you have more requirements (the paren must start at the beginning of the line and/or end at the end of the line, or other such modifications), those refined requirements can be met. However, you will need to be more explicit.

    ----

    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 clipbpard to your post using Ctrl+V to show graphical items, but any text should be included as literal text in your post so we can easily copy/paste your data. 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.

  • Removing punctuation before a line

    13
    0 Votes
    13 Posts
    2k Views
    УменяМодем ОграниченныйТрафикУ

    Yes, everything worked out, thank you!
    The first time I didn’t understand anything… the second time I didn’t notice my mistake…
    And the third time you read that I understood everything! :)

  • "new 1" never goes away

    6
    0 Votes
    6 Posts
    393 Views
    Paul RoubekasP

    Don’t have permission to change or delete the file. I have reached out to someone who does to make the change. It may take a day or two.

    Thanks for the help. :-)

  • Delete unwanted characters

    2
    0 Votes
    2 Posts
    177 Views
    EkopalypseE

    @Zara-Arik

    First of all thanks for the examples.
    We can see that you have made an effort to explain your goals.
    Unfortunately, at least for me, the explanations are confusing, so I don’t really understand what you want to do.
    Obviously, like me, English is not your first language, so I would recommend that you use an Online Translator to help you.
    Please note, the better/precise the question in your mother tongue is set, the better the translation will be.

    To the questions:

    Use the find dialog, go to the Mark Tab and mark the hits, optionally set bookmarks for each line

    Probably a regex search for \(.+?\) could provide this.

    How do you know if a sentence begins or ends. For this you actually need an AI that was really programmed for it and even this one won’t work 100%

    and 5. I do not understand.

    Translated with www.DeepL.com/Translator (free version)

  • How to create a remove "Search Mode: Regular expression"

    20
    0 Votes
    20 Posts
    600 Views
    redorbroderR

    @PeterJones
    Thanks for your help and info.
    I’ll just leave the accounts as they are, don’t want to mess things up…
    This account will be the one I use from now on.

    Best regards,
    Red

  • Trying to completely remove notepad++

    4
    0 Votes
    4 Posts
    10k Views
    Metin BatM

    hi, first of all i had a similar problem and it took a long time to solve the problem. as a result, I solved the problem completely and the steps should be as follows; First, you should uninstall Notepad ++ from the program manager, then open the file manager and select the option to show hidden files, folders and drives again in the window with the options> options> folder. then say okay close the windows. Open this computer window and search by typing Notepad ++ in the search box. after doing all these, run the registry editor searching CTRL + S Regedit, close all open folders, click on the computer and open the search window with the combination of CTRL + F Search the name Notepad ++ and delete the found files. Use the find next option to find and delete all, then restart your computer. Download notepad ++ x86.exe and x64.exe, then install the first x86. disable run when finished setup. then install the x64 version without running anything. When installation is finished run and close notepad ++. then reload the x86 version and all settings will be reset.

  • Configuration files each project?

    3
    1 Votes
    3 Posts
    157 Views
    Christian BusseC

    @Alan-Kilborn said in Configuration files each project?:

    @Christian-Busse

    I suggest using the EditorConfig plugin.
    For background infos, see https://editorconfig.org/

    Great! Perfect for us!

  • [UDL] Labels highlight In Custom Batch Doesn't Work As Expected

    31
    1 Votes
    31 Posts
    2k Views
    EkopalypseE

    Now we can rest and go to bed :-D
    If there is anything about the script let us know here.

    Good night.

  • batch scripts now open in npp instead of running.

    4
    0 Votes
    4 Posts
    333 Views
    Vin dickatorV

    @PeterJones I thought, they wanted Batch to run instead of opening it in Notepad++ directly (like the default functionality); guess I mis-understood their motives…

  • Any way to create a shortcut to add prefix and suffix to a word?

    15
    0 Votes
    15 Posts
    2k Views
    Alan KilbornA

    Okay, here’s another (and probably last) try.
    Basically, if there’s no active selection and the caret isn’t touching a word when the script is run, it means you want to modify the current prefix/suffix setup.
    Otherwise, the current prefix/suffix is applied to the current selection/word.

    # -*- coding: utf-8 -*- from Npp import editor class T19459a(object): def __init__(self): self._prefix = '' self._suffix = '' def update_prefix_suffix_info(self): separator = '-' while True: user_input = notepad.prompt( 'Enter PREFIX{s}SUFFIX :\r\n(PREFIX or SUFFIX (not both) maybe be empty, but must still use {s})'.format(s=separator), '', '') if user_input == None: return # Cancel parms_list = user_input.strip().split(separator) if len(parms_list) == 2: (prefix, suffix) = parms_list if len(prefix) + len(suffix) == 0: continue break self._prefix = prefix self._suffix = suffix def run(self): already_ran_input_prompt_this_cycle = False if len(self._prefix + self._suffix) == 0: self.update_prefix_suffix_info() already_ran_input_prompt_this_cycle = True word_at_caret_or_selection = '' (sel_start, sel_end) = (editor.getSelectionStart(), editor.getSelectionEnd()) if editor.getSelections() == 1 and sel_start != sel_end: word_at_caret_or_selection = editor.getTextRange(sel_start, sel_end) else: start_of_word_pos = editor.wordStartPosition(editor.getCurrentPos(), True) end_of_word_pos = editor.wordEndPosition(start_of_word_pos, True) if start_of_word_pos != end_of_word_pos: word_at_caret_or_selection = editor.getTextRange(start_of_word_pos, end_of_word_pos) editor.setSelection(end_of_word_pos, start_of_word_pos) if len(word_at_caret_or_selection) == 0: if not already_ran_input_prompt_this_cycle: self.update_prefix_suffix_info() elif len(self._prefix + self._suffix) > 0: editor.beginUndoAction() editor.replaceSel(self._prefix + word_at_caret_or_selection + self._suffix) editor.endUndoAction() if __name__ == '__main__': try: t19459a except NameError: t19459a = T19459a() t19459a.run()
  • SecurePAD HELP

    2
    0 Votes
    2 Posts
    209 Views
    PeterJonesP

    For future readers who think we ignored this question, it’s because we tackled the problem in https://community.notepad-plus-plus.org/topic/19455/securepad-help, a nearly-identical posting from about a minute later in the Plugin Development category.

  • regex replace doesn't work

    4
    1 Votes
    4 Posts
    227 Views
    Alan KilbornA

    @Stefan-N said in regex replace doesn't work:

    By “leading assertions” you are talking about the “look ahead/behind” structure?

    Yes.

    When you are doing “step finds” (where you press Find Next to repeatedly jump to the next match), the buffer to be searched literally starts right where the caret is.
    There is no knowledge of what comes to the “left” of the caret.
    Thus, a positive look-behind assertion at that point will always fail – which is what you are seeing.
    A negative look-behind assertion will always succeed.
    Just a peculiarity of the N++ searching engine.
    Something to remember for the future!