• Regex: Put a dot after every 10 words

    10
    0 Votes
    10 Posts
    992 Views
    guy038G

    Hi, @neculai-i-fantanaru and All,

    I forgot to explain why the first provided regex was (?:([\w'’]+)\W+){9}(?1)\K and not the regex (?:([\w'’]+)\W+){9}\1\K

    Well, the \1 right before \K would match the last occurrence of the group 1, that is the ninth word found with the regex [\w'’]+ !

    So, the regex (?:([\w'’]+)\W+){9}\1 would match strings like :

    111 222 333 444 555 666 777 888 999 999

    or

    000 111 222 333 444 555 666 777 888 888

    but NOT the string :

    000 111 222 333 444 555 666 777 888 999

    On the contrary, the (?1) syntax, is a subroutine call to the group 1 and is, fundamentally, identical to the regex [\w'’]+ itself. So, the regex (?:([\w'’]+)\W+){9}(?1) would also match my third example too and any other word ;-))

    Best Regards

    guy038

  • Version 8.1.4

    4
    0 Votes
    4 Posts
    385 Views
    forensicsmanF

    This is an image file that has this as just a regular downloaded file, and when I execute it on any system this happens, the image is defaulted to English and N++ installs in Dutch, there is nothing else being done to this file. I also have been doing this for years and never had an issue with the past versions of N++.

  • Find and search windows washed out

    3
    0 Votes
    3 Posts
    272 Views
    Terry RT

    @Michael-Agner-0 said in Find and search windows washed out:

    However when I try to use either Find or search, the box that comes up is completely washed out and is almost totally unreadable.

    I’m picking that your transparency settings are set wrongly. See my image below.

    9788583f-87d5-4dac-961d-3f1e957f6788-image.png

    The text above the find window refers to some of the contents of the config.xml file, usually found in the %appdata%\Notepad++ folder. So if you are unable to adjust the transparency via the find window, then open the config.xml file and directly edit the transparencyMode, making it 1. 1 means when the window is the focus it is fully showing, when set to 2 it will remain “washed out” even when in use which is what I expect you are seeing.

    Please note that as the config.xml file will be written to by Notepad++ if some settings are changed, editing this file should be done in a session in Notepad++ all by itself, closing Notepad++ after editing. Otherwise you may find your changes are removed.

    Terry

  • 0 Votes
    2 Posts
    456 Views
    PeterJonesP

    @Ryad-Arlan ,

    Search/replace (regex) does not know how to count. So it cannot increment your replacement, and it cannot count how many replacements it has done.

    To do that, you need a programming language. If you use a plugin like PythonScript, you can leverage the full power of the Python language and give it the access to the contents of the Notepad++ editor window. If you’re willing to go that route, you can search the forum for add_1 and find a lot of examples for the “add_1” style of pythonscript search-and-increment-replace. For stopping after 20 instances, you can look at the optional final argument of the editor.rereplace(search, replace[, flags[, startPosition[, endPosition[, maxCount]]]]) method.

    if you have trouble customizing what you’ve seen elsewhere for your specific situation, show us what you’ve tried, and we might be able to point out where it’s gone wrong.

  • 0 Votes
    4 Posts
    386 Views
    PeterJonesP

    @Clayton-Lewis said in Need numbers going up on every blank line followed by a previous line break for subtitles:

    except for step 3 part 2-4.

    You are right. After 3.4, I should have said another Begin/End Selection. Sorry. But yes, what you described is equivalent.

  • 0 Votes
    6 Posts
    2k Views
    PeterJonesP

    @Bader-Alharbi said in I want to compare two files and bookmark the lines containing similar words:

    is there a regex to add the line number in multiple places in the line?

    Regular expressions cannot count (they have no concept of “increment a number”). Your two options inside Notepad++ are using the Column Editor like you’ve already discovered, or using a scripting plugin like PythonScript and using the full power of a programming language to influence the text in the open file. (I actually just answered a question earlier today on that same concept.)

    apply it to different files with a different number of lines.

    as linked in that other topic (and the links refenced there), you can make a macro that will do the begin/end-select for column mode… and if you combined that with other controls, like the Ctrl+Home to go to the start of the file, and Ctrl+End to go to the end, you could have a macro that does the zeroeth-column select in the macro, then manually type Alt+C to bring up the column editor and insert the numbers, then you could use another regex (using multiple capture groups) to distribute the number from the beginning of the line to the various locations throughout the line that you need

  • Regex: Search and Replace in Chess PGN

    7
    0 Votes
    7 Posts
    569 Views
    jhone vickJ

    @Nguyen-Wanderoz Hey,
    i jus Wanna Need Your Help I am Having Some issue In My Project When I press Shift Button Mt [SpaceBar stop Responding.
    I Need [Help]

  • Visibility of EOL

    7
    0 Votes
    7 Posts
    804 Views
    astrosofistaA

    @Alan-Kilborn said in Visibility of EOL:

    I believe that a newer Scintilla editing component than N++ (8.1.4) currently uses is available which makes the effect less pronounced, but this newer component would have to be integrated into N++ in order to work.

    That is correct. For the curious among you, the new feature was introduced in Scintilla 5.1.0. See here for details.

  • .msi installer

    2
    0 Votes
    2 Posts
    964 Views
    Alan KilbornA

    @Muhammad-Farhan

    There is no .msi installer.
    Your download options are on the download site: https://notepad-plus-plus.org/downloads/v8.1.4/

  • Can't figure out a proper way to make this custom UDL work

    3
    0 Votes
    3 Posts
    354 Views
    TBlazeWarriorTT

    @PeterJones Thanks a lot for the clarification. I think the proposed solution is a bit too complex for me (and the operators didn’t cause me issues), and you’ve sadly confirmed that most bugs I’m experiencing are unfixable, so I might leave it the language as it is.
    It is a bit of a pity that it is like this, but it’s not too bad and at least now I know it’s not my fault, so thanks again

  • Splitting to multiple files

    8
    0 Votes
    8 Posts
    5k Views
    Terry RT

    @Alan-Kilborn said in Splitting to multiple files:

    Did you have something in mind that was more sophisticated than that (but still a poor approach compared to non-N++ solutions)?

    Nope, just the same as you. it would require effort in setting up the PythonScript (or other program lang.), or regex to do the job. then if OP wasn’t happy with result, having to change the process to accommodate. The non-N++ solutions have all those options baked in, so far easier.

    Also the number of lines the OP stated makes me wary that a buffer overload may occur as well.

    Terry

  • Linking html to css

    5
    0 Votes
    5 Posts
    1k Views
    PeterJonesP

    For future readers, don’t have the same misunderstanding as was expressed above: we help Notepad++ users to use Notepad++. We are quite happy to do so. I personally tackle many Notepad++-related problems in this forum nearly every day. Just look at the recent posting history for factual proof of this.

    What we cannot be is the entirety of stack exchange: we do not have experts on every possible programming language and every possible markup language and every possible cookie recipe.

    Just because you use a particular text editor to type your source code doesn’t mean that the forum for that text editor should be expected to answer any programming questions you have.

    If you have a C-programming question, go to a forum that specializes in C. If you have an HTML+CSS+JavaScript question, go to a forum about web authoring. If you have a question about cookie recipes, go to a cooking or baking forum. If you have questions about how to sort the text in your text file that you’re editing with Notepad++, this is the right place for you.

    But going back to @Munawar-Ali’s question: it was said, “still it just shows the html on browser” – that might be interpreted as “it is showing the raw HTML markup rather than the rendered webpage”. If that’s the case, then you can use Notepad++ to save the file as HTML and give it a .html extension. And when you are using Notepad++ to type your HTML and CSS files, you can have your saved HTML file in the active tab in Notepad++ and run View > View Current File in… to pick your favorite browser, and Notepad++ will issue the command for that browser to open the active file in the browser; if it’s properly saved as HTML, and the browser will render that HTML file as a local webpage; if the HTML is written correctly (with all the files in the right place relative to each other), then it will render correctly in the chosen browser.

  • Image links

    2
    0 Votes
    2 Posts
    627 Views
    Alan KilbornA

    @Angela-Madera

    I’m sure someone can, but not here.
    This area is for discussion about Notepad++ the text editor, not “images on a website”.

    Please find an appropriate forum for your question – thanks.

  • Page-down scrolls everything off the top of the window

    4
    0 Votes
    4 Posts
    947 Views
    StephanKolassaS

    @Michael-Vincent Thanks for that fast reply! That did the trick!

  • menu - entry: (german) Zeilenumbruch

    2
    0 Votes
    2 Posts
    573 Views
    PeterJonesP

    @Andree-Henkel ,

    [translated to English] Menu Entry: (german) Word Wrap (or maybe Line Break)

    What about the Word Wrap menu entry in German?

  • Desapareció la opción Arriba en la Ventana Abrir Archivos

    2
    0 Votes
    2 Posts
    353 Views
    PeterJonesP

    @Carlos-Figueroa-Arteaga ,

    Again, I will not here that Notepad++ is a Windows application, and the developers only support Windows environments; if you can make it work in Wine (which is what PlayOnLinux uses under the hood), great for you! But that’s not a supported use case.

    2 Notepad updates prior to v8.1.4 (32-bit) on Ubuntu 18 with PlayOnLinux disappeared the option to go Up to upper folders. This is very uncomfortable. Please put it back. Thanks.

    The Notepad++ Open File dialog does allow going up directories, in the same way it always has. If Wine/PlayOnLinux do not support the standard windows API calls that Notepad++ uses to get the OpenFIle dialog working, then the problem is with Wine/PlayOnLinux, not with Notepad++.

    Sorry.

  • Bug en Ventana Buscar v8.1.4 (32-bit) en PlayOnLinux

    2
    0 Votes
    2 Posts
    202 Views
    PeterJonesP

    @Carlos-Figueroa-Arteaga ,

    Sorry, based on the google translation of your problem, I am not sure what is wrong with the Search window for you. For me, on Windows 10, the search engine works just fine on Notepad++ v8.1.4.

    It should be noted that Notepad++ is a Windows application, and the developers only support Windows environments; if you can make it work in Wine (which is what PlayOnLinux uses under the hood), great for you! But that’s not a supported use case.

  • Moving text into a file

    8
    0 Votes
    8 Posts
    1k Views
    Gasser AndréG

    @Hi Terry

    Thanks a lot for your clear and precise explanation. It works fine.

    Best regards and again many thanks for your help
    André

  • Add single quote and comma

    2
    0 Votes
    2 Posts
    15k Views
    Terry RT

    @chin-pat said in Add single quote and comma:

    How can I add single quote and comma for each of the sequence no and also how can I get this on a column like this

    To get this:
    ‘12345’, ‘56789’, ‘23456’, ‘56789’, ‘56789’
    use the following regular expression in the Replace function (search mode is regular expression). Note the single quote isn’t what you show in the post, verify I have the correct one as the posting engine does change quotes when not inside the black boxes (se the </> icon to encapsulate examples)
    Find What:\d+(?=(\x20)|$)
    Replace With:'$0'(?1,)

    To get this
    12345
    56789
    23456
    56789
    56789
    use the following regular expression
    Find What:\x20
    Replace With:\r\n

    Terry

  • How to make comments in code stand out

    2
    0 Votes
    2 Posts
    715 Views
    Alan KilbornA

    @Cyndi-Roether

    The key is to make your file a Python file and then things (comments included) will “stand out”, example:

    e0a23532-387e-46ae-b5fa-64cd45bf26b3-image.png

    See where it says “Python file” on the status bar?

    You can make this appear by saving your file with a name that ends in .py, or by choosing “Python” on the Language menu.

    Also, a Python comment involves no “bracketing”. A # appearing on a line will cause anything following that character (and still on that same line) to be a comment.