• Notepad++ for macbook m1

    4
    -2 Votes
    4 Posts
    2k Views
    Jacky JoyJ

    @PeterJones said in Notepad++ for macbook m1:

    @Тимофей-Козак ,
    No.
    It’s a Windows application, written with the win32 api.

    thanks for the awesome information.

  • how to copy lines adjacent to bookmark lines?

    3
    -2 Votes
    3 Posts
    201 Views
    ghost 001985G

    thank you!

  • Delet specific part of the line

    3
    0 Votes
    3 Posts
    319 Views
    martin sedlacekM

    Thank you so much. Your answer helps me understand how these shortcuts work and solved my problem.

    Thanks for help.

  • how to delete everything after log in combo on multiple lines

    3
    0 Votes
    3 Posts
    166 Views
  • How to delete all lines found in another txt document in notepad++

    4
    0 Votes
    4 Posts
    1k Views
    Alan KilbornA

    @PeterJones

    Here’s one that is very similar to this current question:

    https://community.notepad-plus-plus.org/topic/20443/deleting-numbers-from-list-1-that-also-appear-in-list-2

    A posting in that thread links to a PythonScript solution here:

    https://community.notepad-plus-plus.org/post/54316

  • 0 Votes
    2 Posts
    167 Views
    PeterJonesP

    @ShamithaSIlva ,

    Regarding the save, there is a known bug in v8.1.1 and v8.1.2 . It has been confirmed fixed on v8.1.3, which is currently at release candidate 3, though will hopefully be released soon.

    For the FIND menu, maybe the v8.1.3-RC3 will fix it for you, too. But I’ve never had problems pasting into the FIND WHAT textbox, so I cannot confirm that the problem exists.

  • add text in multiple files

    3
    2 Votes
    3 Posts
    413 Views
    Stefano SchiaviniS

    thank you,

    exactly what I needed.
    works great.

    Stefano

  • Encapsulating specific lines with angle brackets

    4
    0 Votes
    4 Posts
    1k Views
    PeterJonesP

    @guy038 ,

    I agree with your interpretation. I just didn’t see enough in my first reading to get that far.

    Because the original post didn’t show a “before” and “after” state, I missed the “every line that starts with @” portion. Since I didn’t see enough information, I gave a brief reply that introduced the concepts required, and linked to the appropriate reading for those concepts.

    But yes, doing it my way with the “every line that starts with @”, I would change my FIND to (?-s)^@(.*)$ and the full replacement would be <$1>.

    For @Elnaz-Kia ,

    The substitution escape sequences section of the same usermanual page briefly describes @guy038’s $0 notation and my $1 is described in the section on $ℕ in the document. Both are essentially equivalent, with @guy038 making use of the automatic “whole match” capture group and mine using an explicit capture group.

  • Sign not showable?

    3
    0 Votes
    3 Posts
    151 Views
    BlackMage2B

    Many thanks! That helped. :D

  • Chapter Headings

    2
    0 Votes
    2 Posts
    1k Views
    PeterJonesP

    @Dave-Clark ,

    A text file knows nothing about chapters, headers, or the like. It is a series of bytes which are all interpreted as text (hence the name “text file”).

    I don’t know about the Kindle formats in particular, but when I’ve looked into open-source EPUB format, it is basically a zipped collection of HTML and associated images.

    So maybe if you wrote your text file as HTML, using HTML syntax for headings (<h1>, <h2>, …), that would give you what you need.

    But none of this is really on-topic here, because the answer would be the same whether you use Notepad++ (which you should), or Windows notepad.exe (shudder), or copy con textfile.txt () to edit your file.

  • 0 Votes
    2 Posts
    225 Views
    EkopalypseE

    @stmav
    Sorry, but this is hardly possible with the built-in UDL since parts
    are dynamic and UDL does not provide regex terms to identify different parts.
    You have to write your own lexer for this case.
    A scripting plugin like PythonScript can be used to make this possible.
    If you are familiar with another programming language there may be ways to use it as well.

  • 0 Votes
    6 Posts
    368 Views
    guy038G

    Hello, @robin-cruise and All,

    In the search regex (?s)(https://xxx.com/en/)([^"]+)".+?\1(?!\2").+?" :

    The regex part https://xxx.com/en/ looks for the literal string https://xxx.com/en/, stored as group 1

    The regex part ([^"]+)" represents the remainder of the internet address ( for instance the string page-AAA.html ), followed with a double-quote, because [^"]+ is a non-null range of consecutive chars, all different from ", stored as group 2

    Now, the part .+? stands for the shortest range of any char till…

    The group 1 ( \1 ). So an other string https://xxx.com/en/

    Which must be followed by .+?", which represents the shortest non-null range of any char before a double-quote

    But ONLY IF this range is different from \2 ( i.e. different, for instance, from the string page-AAA.html and a " char )

    Note also that the [^"]+" syntax, without the parentheses, is more restrictive than .+?" and must be preferred because of the negative look-ahead (?!\2")

    Besst Regards,

    guy038

  • Please need a multiple renewable change

    5
    0 Votes
    5 Posts
    383 Views
    guy038G

    Hello, @patrick-rozon , @peterjones , @terry-r and All,

    Here is my solution. Not ideal, of course, as it would be suitable for small file size, only, but quite flexible !. It also uses a dummy character, not present in current file. I presonally chose the ¤ char of my French keyboard but, of course, any other char may be used

    Add a line ¤123456 at the very end of current file

    SEARCH (?s)&(.*¤)(\d)(\d+)|¤\d+

    REPLACE ?1\2\1\3\2

    Tick the Wrap around option

    Select the Regular expression seardh mode

    Hit, repeatedly, on Alt + R ( Replace button ) OR on Alt + A ( Replace All button ) till one of the follwing messages occurs :

    Replace: one occurrence was replaced. No more occurrences were found.

    Replae All: 0 occurrences were replaced in entire file

    One advantage of this method is that you may change, either, the modudlo and the values, without changing the regex S/R ! For instance, let’s suppose you want to replace any & char, by any even number ( so, modulo 5 ), in decreasing order, Then, simply add the line ¤86420 at the very end of the file and just use the regex S/R mentionned above !

    So, from the INPUT text :

    ------------&--------------&----&&-----------------&----------------&----- ------------&--------------&----&&-----------------&----------------&----- ------------&--------------&----&&-----------------&----------------&----- ¤86420

    After 19 replaceemnts, we would get the OUTPUT text :

    ------------8--------------6----42-----------------0----------------8----- ------------6--------------4----20-----------------8----------------6----- ------------4--------------2----08-----------------6----------------4-----

    Best Regards,

    guy038

  • How do you update AppData configs like contextMenu.xml?

    8
    1 Votes
    8 Posts
    1k Views
    EkopalypseE

    …, I suggested to only save the changes that are different from the default file to the users file.

    but that means it has to have its own name, otherwise it won’t
    work with portable versions where EVERYTHING has to be under a root directory.

  • How to properly display French characters in HTML?

    7
    0 Votes
    7 Posts
    4k Views
    Pour SvdeuxP

    @Alan-Kilborn
    Got it, thanks!

  • Extract from a list

    2
    0 Votes
    2 Posts
    216 Views
    PeterJonesP

    @Pedro-Contreras ,

    Assuming your post converted ASCII quotes to smartquotes because you didn’t use the </> button in the forum, then an answer that works for the data you presented is to use regular expression mode with FIND = (?-s)^([^,\r\n]*?,){2}'([^,\r\n]*?)',(?1){4}'([^,\r\n]*?)',.*$ and REPLACE = $2 $3

    (2X0997,'navx8n','nap345','','','Nava','A','firstname@yahoo.com','no 2Z,n street,saras ng,selaiyur','','chennai','TN ','IN','0000X3','0000-00-00')

    becomes

    nap345 firstname@yahoo.com

    ----

    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 literal text using the </> toolbar button or manual Markdown syntax. To make regex in red (and so they keep their special characters like *), use backticks, like `^.*?blah.*?\z`. Screenshots can be pasted from the clipboard 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.

  • Notepad++ How to find in page with UTF-8 instead of ANSI ?

    3
    0 Votes
    3 Posts
    218 Views
    Robin CruiseR

    yes, nice answer. But very hard , because I need to change almost all words from every sentence:)

  • How do I replace only the first <br> tag across multiple files?

    25
    0 Votes
    25 Posts
    2k Views
    guy038G

    Hi, @scott-nielson and All,

    A bit off-topic : Yeah, it’s a common mistake when doing translations ! In French, this kind of words are known as “faux amis” words ! Just because :

    In English, the adjective sensible have the French sense of raisonnable / sensé or pratique

    In French the adjective sensible have the English sense of sensitive or noticable

    So, I should have used the expression sensitive to case !

    Cheers,

    guy038

  • F7 does not work

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

    I tried it now - the function works!
    Now it doesn’t work again - there is nothing in the window again!
    And the function did not find a match!
    I did everything as you say here!2021-08-07_13-29-31.png

  • Can Some Help Me?

    5
    0 Votes
    5 Posts
    194 Views
    GregG

    Hi Peter,

    I figured out what you were trying to tell me and YES I was able to find the missing files.

    Thank you for your assistance. Very much appreciated.

    Greg Shaw