• Find and replace a variable item

    10
    0 Votes
    10 Posts
    7k Views
    PeterJonesP
    @Tazhar0001 said in Find and replace a variable item: Peter, is it possible to send you a private message of the .XML file I have? My knowledge in doing such a task is, minimal to say the least. There are no PM on this, and I don’t advertise my email address here (avoiding spambot harvesting). The [example data](https://community.notepad-plus-plus.org/post/50274 you showed near the start of this thread does work with the script I provided (well, I guess my previous post was missing the first line needed): from Npp import * def add_1(m): return (m.group(1)) + str(int(m.group(2)) + 1) + (m.group(3)) editor.rereplace('(lootmax=")([0-9]+)(")', add_1); Even with data like: lootmax="2" lootmax="4" lootmax="6" lootmax="1" lootmax="5" lootmax="9" <tag other="x" lootmax="2" /> <tag other="y" lootmax="4" /> <tag other="z" lootmax="6" /> <other>blah</interferes> <tag other="p" lootmax="1" /> <tag other="d" lootmax="5" /> <tag other="z" lootmax="9" /> all the lootmax="#" get one added properly. If you need help with PythonScript Install PythonScript (if you don’t already have it): Plugins > Plugins Admin, check the box on ☐ PythonScript, and click Install; restart Notepad++ as needed Plugins > PythonScript > New script, named lootmax.py Paste the contents of the script from this post. Save. Set Notepad++'s active file to your file with the lootmax values. Run **Plugins > Python Script > Scripts > lootmax`; the replacement should occur.
  • 0 Votes
    5 Posts
    2k Views
    Mark HarneyM
    @PeterJones said in How to remove all lines before a string value including the line with a string: (?s).(?-s)^Content-Type: message/rfc822.\R{2} I had just tried with rfc822 and it did not work, but I have tried again with the string you gave me and it works. I really appreciate your help! Mark
  • How to create abbreviations for java code

    29
    0 Votes
    29 Posts
    12k Views
    guy038G
    Hi, @michael-vincent, @peterjones and All, As you suggested, @michael-vincent, I removed the space char between the # symbol and the string LANGUAGE_NAME. But, after saving and restarting N++, the pseudo abbreviation tags #LANGUAGE_NAME=.... still appear in dialog, when choosing the Plugins > QucikText > Options... !? Luckily, it does not interfere with the abbreviation tags management of the last version 0.1.2.4 of the QuickText plugin, which remains correct ;-)) Cheers, guy038 P.S. : Actually, I just did an additional test, changing any line #LANGUAGE_NAME=.... into lines LANGUAGE_NAME=.... and, this time, these lines are not displayed in the Options dialog ;-))
  • 1 Votes
    1 Posts
    430 Views
    No one has replied
  • 0 Votes
    4 Posts
    978 Views
    Alan KilbornA
    This situation could also result from the use of the EditorConfig plugin, depending upon how it is configured with the .editorconfig files. Just sayin.
  • Notepad++ running as a service in windows 2012 R2?

    3
    0 Votes
    3 Posts
    702 Views
    ?
    Thanks a lot for your advice!
  • Replacing buttons with images

    2
    0 Votes
    2 Posts
    539 Views
    Alan KilbornA
    @Paulo-Martins This should get you started…click HERE.
  • One line per 1000 items in a macro?

    17
    2 Votes
    17 Posts
    4k Views
    sepodeleS
    Great stuff guys. It works like a charm! Thank you! :-)
  • 0 Votes
    5 Posts
    10k Views
    CletosC
    Thank you, andrecool-68, Works great. Hello guy038, That option does it very good as well, thank you. Thanks Alan.
  • Where to find HexEditor.dllfor 64 bits W10 ?

    2
    0 Votes
    2 Posts
    551 Views
    PeterJonesP
    Since HexEditor hadn’t been officially updated since 2009, @chcg has made an unofficial 64-bit port of HexEditor available at https://github.com/chcg/NPP_HexEdit/releases, with a couple of bugfix releases. The most recent x64 zipfile is the one you’ll want. For a normal Notepad++ installation, unzip HexEditor.dll into c:\Program Files\Notepad++\Plugins\HexEditor\HexEditor.dll, then reload Notepad++.
  • Remove Keywords python language

    4
    0 Votes
    4 Posts
    801 Views
    Siebe AlbersS
    @PeterJones Thank you! You helped me a lot with this.
  • How to add only one space at end of each line ?

    6
    0 Votes
    6 Posts
    8k Views
    Alan KilbornA
    @mahesh-ageer You didn’t say anything about lines that already had some amount of spaces at their ends. Try to be complete with your problem description. I might be inclined to do that all in one step by searching for \x20*$ and replacing that with a single space.
  • Replace data on specific position by data from 2nd file

    7
    1
    0 Votes
    7 Posts
    2k Views
    Petr KurdiovskýP
    Hi all, I found solution! 1.Add 10 spaces at end of each lines in file X.REN by command $ 2.Copy rectangular selection 10 x number of lines in file X.REN 3.Mark rectangular selection 10 x number of lines on target file in requested position and paste it.
  • dont know

    2
    1
    0 Votes
    2 Posts
    499 Views
    Alan KilbornA
    @bot-rip This should get you started…click HERE.
  • Mass replace inside file at once

    6
    0 Votes
    6 Posts
    3k Views
    Alan KilbornA
    @PeterJones said in Mass replace inside file at once: merge them manually in shortcuts.xml For you, yes, but for a casual Notepad++ user, maybe not. I was just pointing out that a bit of serious concentration when recording macros will go a long way in helping out. :-)
  • Replace every URL with the URL + text

    8
    0 Votes
    8 Posts
    2k Views
    jcg3675J
    Glad to hear that it works! You don’t owe me anything. Just pay it forward to someone else when the time comes :)
  • How To parse String to int in Java?

    2
    0 Votes
    2 Posts
    484 Views
    Alan KilbornA
    @Sarim-Jokhio https://community.notepad-plus-plus.org/topic/15958/faq-desk-you-ve-asked-your-question-in-the-wrong-place
  • How to remove all text after specific text with rule for each line?

    4
    0 Votes
    4 Posts
    1k Views
    guy038G
    Hello, @lionelanh97, @terry-r and All, @terry-r, I don’t think that the look-ahead structure, (?= //) is, even, mandatory ! This regex S/R should be enough : SEARCH (?-si)//Converted.+\K //.+ REPLACE Leave EMPTY As it searches the greatest range of chars .+ between the string //Converted and the string ' //', without the quotes ! Best Regards, guy038
  • 0 Votes
    8 Posts
    2k Views
    Alan KilbornA
    @Alan-Kilborn said in How to open specific files in different folder where root folder might be varied. Open File in Solution is my temporary solution.: It sounds to me like a scripting plugin is needed to solve this problem. Batch file scripting. The plugin-less scripting! :-)
  • Mid Line Comments for Fortran

    3
    0 Votes
    3 Posts
    623 Views
    Phillip AndelsonP
    @PeterJones Thanks for the reply!