Community
    • Login

    Search++ (\W)'(\w) regex replace failure

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    49 Posts 6 Posters 6.0k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Andre Z EckenrodeM Offline
      M Andre Z Eckenrode @Coises
      last edited by

      Thank you, @Coises, and best wishes for a long-term solution.

      1 Reply Last reply Reply Quote 1
      • CoisesC Offline
        Coises @M Andre Z Eckenrode
        last edited by

        @M-Andre-Z-Eckenrode:

        Search++ version 0.6.4 should also fix this, but in a way that won’t impact efficiency in very large files.

        When you have a chance to check, please let me know if you find that it fails. I don’t think it will… but since I can’t reproduce the bug, I can’t be certain.

        (I have not yet addressed the problem that caused Search++ to fail to load for your brother in Windows Sandbox and in virtual machines. I understand the cause, I just have to decide how to deal with it.)

        Thank you so much for all your help!

        Alan KilbornA M Andre Z EckenrodeM 2 Replies Last reply Reply Quote 2
        • Alan KilbornA Offline
          Alan Kilborn @Coises
          last edited by

          @Coises said:

          …fail…in virtual machines

          I’m somewhat curious about this, because, well, isn’t the idea of a VM that it runs the same as a real machine? If it doesn’t, isn’t it a lot less useful? OK, sure, it doesn’t run strictly the same entirely, but I’d say running an app, e.g. N++, either under a VM or not should produce the same results for the user.

          I’ve run Notepad++ exclusively under a VM for 3+ years now, and have never noticed any behavior that was odd. I guess what I’m looking for is that you did something really “oddball” in your plugin, and that in general I have no reason to be concerned.

          CoisesC 1 Reply Last reply Reply Quote 1
          • M Andre Z EckenrodeM Offline
            M Andre Z Eckenrode @Coises
            last edited by

            @Coises said:

            Search++ version 0.6.4 should also fix this

            I’m happy to report that I’ve encountered no further anomalies during the course of several tests while using v0.6.4. You’re quite welcome, and thank YOU again.

            1 Reply Last reply Reply Quote 1
            • CoisesC Offline
              Coises @Alan Kilborn
              last edited by Coises

              @Alan-Kilborn said:
              I’ve run Notepad++ exclusively under a VM for 3+ years now, and have never noticed any behavior that was odd. I guess what I’m looking for is that you did something really “oddball” in your plugin, and that in general I have no reason to be concerned.

              Running in a VM or the Windows Sandbox was just an indirect cause. The real cause was the absence of a Visual C runtime redistributable library.

              I reproduced the problem immediately in Windows 10 Sandbox, and I’m confident the cause in his brother’s virtual machines was the same. Most people have installed that runtime on a general purpose machine at some time or other as a side-effect of installing one application or another.

              In a program with a proper installer, the installer would check for the presence of required libraries and start an installer for any missing libraries. (I’m sure you’ve seen that.) A Notepad++ plugin can’t really do that. Normally we just compile with everything statically linked.

              The reason for the dependency is that I’m currently using pre-compiled versions of the ICU libraries. Those libraries, in turn, dynamically link to the Visual C runtime.

              I think the proper solution to this must be to include the ICU source as a second project in my Visual Studio solution and compile everything with static linkage. I’m just not sure how to do that yet: I don’t think ICU has a drop-in project for a VS solution that uses MS Build, and as it happens, I know next to nothing about build systems. :-(

              The next most proper would be to say something in the readme that if the plugin won’t load, it could be because you need to install these libraries.

              Another possibility would be to use Windows’ version of ICU. That would mean being behind the latest version (Windows doesn’t routinely update its version of the libraries) and for certain not working on Windows versions earlier than Windows 10 version 1703. At present, Search++ doesn’t appear to work on Windows 7 anyway (I’m unsure about Windows 8/8.1); that appears also to be a result of using the ICU DLLs, and it might be resolvable if I compile them as part of the plugin; at present, I don’t know.

              The simplest way would be to include the redistributable libraries in the zip file. At the least, that would technically be a GPL violation, since those libraries are not released under a GPL-compatible license. (As I understand it, you can depend on system libraries, but you can’t include a library in your distribution and claim it falls under the system library exception.) Aside from technicalities, I’m unsure if there might be other pitfalls to doing that.

              sevem47S 1 Reply Last reply Reply Quote 1
              • sevem47S Offline
                sevem47 @Coises
                last edited by

                @Coises said:

                Search++ doesn’t appear to work on Windows 7 anyway

                Just for your information; this is something I can NOT confirm. For me Search++ even runs on my old, not up to date Windows 7 machine (see below debug info). Perhaps this is as well a question of having all the “correct libraries” to be able to run the plugin. If you want some further information, just tell me and I will see if I can provide you more details (but it is not a development machine; I just use it for writing documents).

                Notepad++ v8.9.7   (32-bit)
                Build time: Jul 14 2026 - 01:11:31
                Scintilla/Lexilla included: 5.6.4/5.5.1
                Boost Regex included: 1_90
                pugixml included: 1.16
                nlohmann JSON included: 3.12.0
                Path: C:\ProgramData\UserApp\Notepad++\notepad++.exe
                Command Line: 
                Admin mode: OFF
                Local Conf mode: OFF
                Cloud Config: OFF
                WinGUp: absent
                disableNppAutoUpdate.xml: present
                Periodic Backup: OFF
                Placeholders: OFF
                Scintilla Rendering Mode: SC_TECHNOLOGY_DEFAULT (0)
                Multi-instance Mode: monoInst
                asNotepad: OFF
                File Status Auto-Detection: cdEnabledNew (for current file/tab only)
                Dark Mode: OFF
                Display Info:
                    primary monitor: 1024x600, scaling 100%
                    visible monitors count: 1
                    installed Display Class adapters: 
                        0000: Description - Intel(R) Graphics Media Accelerator 3150
                        0000: DriverVersion - 8.14.10.2117
                        0001: Description - Intel(R) Graphics Media Accelerator 3150
                        0001: DriverVersion - 8.14.10.2117
                OS Name: Windows 7 Starter (32-bit)
                OS Build: 7601.0
                Current ANSI codepage: 1252
                Plugins: 
                    ComparePlus (3)
                    DSpellCheck (1.5)
                    MarkdownViewerPlusPlus (0.8.2)
                    mimeTools (3.1)
                    NppConverter (4.7)
                    NppExport (0.4)
                    NPPJSONViewer (2.1.1)
                    PoorMansTSqlFormatterNppPlugin (1.6.13.31502)
                    Search++ (0.6.4)
                    XMLTools (3.1.1.13)
                
                
                CoisesC 1 Reply Last reply Reply Quote 1
                • CoisesC Offline
                  Coises @sevem47
                  last edited by

                  @sevem47 said:

                  Just for your information; this is something I can NOT confirm. For me Search++ even runs on my old, not up to date Windows 7 machine (see below debug info). Perhaps this is as well a question of having all the “correct libraries” to be able to run the plugin.

                  Well, that’s interesting. Thank you for that information! I will take a closer look.

                  1 Reply Last reply Reply Quote 1
                  • CoisesC Offline
                    Coises @M Andre Z Eckenrode
                    last edited by

                    @M-Andre-Z-Eckenrode said:

                    About my brother’s initial failures to get Search++ to load in his portable copy: His first four or so tries were attempted in different virtual machines on his computer, including the very first one being Windows 11’s built-in “Sandbox”. All of them failed with messages such as “The specified module could not be found” and “Search++.dll is not compatible with the current version of Notepad++”. But when he tried the same set of files on his real machine, it worked. He routinely runs various other programs in virtual machines just fine.

                    I expect that Version 0.6.5 will fix this.

                    M Andre Z EckenrodeM 1 Reply Last reply Reply Quote 2
                    • CoisesC Coises referenced this topic on
                    • M Andre Z EckenrodeM Offline
                      M Andre Z Eckenrode @Coises
                      last edited by M Andre Z Eckenrode

                      @Coises said:

                      I expect that Version 0.6.5 will fix this.

                      Noted, thanks again, and I’ll let him know — although he actually doesn’t typically use regex for his own purposes.

                      1 Reply Last reply Reply Quote 1

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      • First post
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors