• Remove specific lines fron nfo's

    Oct 24, 2020, 7:45 PM
    0 Votes
    8 Posts
    444 Views

    @Andrew-Gill said in Remove specific lines fron nfo's:

    remove any lines that start with <studio>

    I’ll just point out that your original problem statement said the above.
    The solution I provided considered that.
    But your real data didn’t have that condition.
    So that’s why my solution didn’t work initially.

  • 0 Votes
    2 Posts
    380 Views

    @Dennis-Bareis

    that is the way to reload saved sessions. Is ThisSession really the file?
    I would have expected ThisSession.xml. If it is the file, can you check if it contains useful data?
    If it does not work, can you post your debug info, available from the last menu, the ? menu and the content of ThisSession?

  • 0 Votes
    17 Posts
    1k Views

    @guy038 Dear Sir,
    Really Great! .Thanks a Lot its works 100%. You saved Me lot of time. Notepad plus plus is great. You’re the one who truly understand my requirements Please accept My Love and Thanks. I am forever grateful for your support!

  • Ignore diacritics in search

    Oct 24, 2020, 6:06 PM
    0 Votes
    3 Posts
    279 Views

    Hello, @steven123, @ekopalypse and All,

    @steven123, I’m pleased to tell you that your request can be solved, easily, by using a POSIX collating sequence into a character class / bracket expression, which defines a list of equivalent characters to the character mentioned in the collating sequence

    The regex syntax of a POSIX collating sequence is [=<Char>=]. Note also that this POSIX collating sequence must be inserted, itself, inside a normal character class [....] or a negative character class [^....] in order to match all the equivalent characters to character Char !

    Refer, for additional information, to :

    https://www.boost.org/doc/libs/1_70_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html#boost_regex.syntax.perl_syntax.equivalence_classes

    https://www.regular-expressions.info/posixbrackets.html#eq

    For instance, the regex (?-i)[A-E[=0=]5-9] would match a uppercase letter from A to E, a digit from 5 to 9, the digit 0 or any of the 4 equivalent characters to digit 0 of the list below :

    0030 Nd 0 Basic Latin DIGIT ZERO 2070 No ⁰ Superscripts and Subscripts SUPERSCRIPT ZERO 2080 No ₀ Superscripts and Subscripts SUBSCRIPT ZERO 24EA No ⓪ Enclosed Alphanumerics CIRCLED DIGIT ZERO FF10 Nd 0 Halfwidth and Fullwidth Forms FULLWIDTH DIGIT ZERO

    So, in order to match, either, the string Ho Chi Minh and the string Hồ Chí Minh, simply use the regex :

    H[[=o=]] Ch[[=i=]] Minh, with the collating sequences [=o=] and [=i=] embedded in a character class

    Some other examples :

    The regex \t[[=a=]]\t, against the list below, would match all the equivalent characters of the a letter, whatever, the case, the accentuation, the size and other specifications of these equivalent chars. That is to say 69 characters ! 0041 A ; Upper_Letter # Lu LATIN CAPITAL LETTER A 0061 a ; Lower_Letter # Ll LATIN SMALL LETTER A 00AA ª ; Other_Letter # Lo FEMININE ORDINAL INDICATOR 00C0 À ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH GRAVE 00C1 Á ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH ACUTE 00C2 Â ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH CIRCUMFLEX 00C3 Ã ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH TILDE 00C4 Ä ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH DIAERESIS 00C5 Å ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH RING ABOVE 00E0 à ; Lower_Letter # Ll LATIN SMALL LETTER A WITH GRAVE 00E1 á ; Lower_Letter # Ll LATIN SMALL LETTER A WITH ACUTE 00E2 â ; Lower_Letter # Ll LATIN SMALL LETTER A WITH CIRCUMFLEX 00E3 ã ; Lower_Letter # Ll LATIN SMALL LETTER A WITH TILDE 00E4 ä ; Lower_Letter # Ll LATIN SMALL LETTER A WITH DIAERESIS 00E5 å ; Lower_Letter # Ll LATIN SMALL LETTER A WITH RING ABOVE 0100 Ā ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH MACRON 0101 ā ; Lower_Letter # Ll LATIN SMALL LETTER A WITH MACRON 0102 Ă ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH BREVE 0103 ă ; Lower_Letter # Ll LATIN SMALL LETTER A WITH BREVE 0104 Ą ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH OGONEK 0105 ą ; Lower_Letter # Ll LATIN SMALL LETTER A WITH OGONEK 01CD Ǎ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH CARON 01CE ǎ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH CARON 01DE Ǟ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON 01DF ǟ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH DIAERESIS AND MACRON 01E0 Ǡ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON 01E1 ǡ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON 01FA Ǻ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE 01FB ǻ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE 0200 Ȁ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH DOUBLE GRAVE 0201 ȁ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH DOUBLE GRAVE 0202 Ȃ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH INVERTED BREVE 0203 ȃ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH INVERTED BREVE 0250 ɐ ; Lower_Letter # Ll LATIN SMALL LETTER TURNED A 0251 ɑ ; Lower_Letter # Ll LATIN SMALL LETTER ALPHA 0252 ɒ ; Lower_Letter # Ll LATIN SMALL LETTER TURNED ALPHA 1E00 Ḁ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH RING BELOW 1E01 ḁ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH RING BELOW 1E9A ẚ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH RIGHT HALF RING 1EA0 Ạ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH DOT BELOW 1EA1 ạ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH DOT BELOW 1EA2 Ả ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH HOOK ABOVE 1EA3 ả ; Lower_Letter # Ll LATIN SMALL LETTER A WITH HOOK ABOVE 1EA4 Ấ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE 1EA5 ấ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE 1EA6 Ầ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE 1EA7 ầ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE 1EA8 Ẩ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE 1EA9 ẩ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE 1EAA Ẫ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE 1EAB ẫ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE 1EAC Ậ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW 1EAD ậ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW 1EAE Ắ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH BREVE AND ACUTE 1EAF ắ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH BREVE AND ACUTE 1EB0 Ằ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH BREVE AND GRAVE 1EB1 ằ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH BREVE AND GRAVE 1EB2 Ẳ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE 1EB3 ẳ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE 1EB4 Ẵ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH BREVE AND TILDE 1EB5 ẵ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH BREVE AND TILDE 1EB6 Ặ ; Upper_Letter # Lu LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW 1EB7 ặ ; Lower_Letter # Ll LATIN SMALL LETTER A WITH BREVE AND DOT BELOW 212B Å ; Upper_Letter # Lu ANGSTROM SIGN 249C ⒜ ; Other_Symbol # So PARENTHESIZED LATIN SMALL LETTER A 24B6 Ⓐ ; Other_Alpha. # So CIRCLED LATIN CAPITAL LETTER A 24D0 ⓐ ; Other_Alpha. # So CIRCLED LATIN SMALL LETTER A FF21 A ; Upper_Letter # Lu FULLWIDTH LATIN CAPITAL LETTER A FF41 a ; Lower_Letter # Ll FULLWIDTH LATIN SMALL LETTER A In the same way, the regex \t[[===]]\t matches all the equivalent characters of the equal sign = : 003D Sm = Basic Latin EQUALS SIGN 207C Sm ⁼ Superscripts and Subscripts SUPERSCRIPT EQUALS SIGN 208C Sm ₌ Superscripts and Subscripts SUBSCRIPT EQUALS SIGN 229C Sm ⊜ Mathematical Operators CIRCLED EQUALS FF1D Sm = Halfwidth and Fullwidth Forms FULLWIDTH EQUALS SIGN And the regex \t[[=Q=]]\t matches all the equivalent characters of the Q letter : 0051 Lu Q Basic Latin LATIN CAPITAL LETTER Q 0071 Ll q Basic Latin LATIN SMALL LETTER Q 02A0 Ll ʠ IPA Extensions LATIN SMALL LETTER Q WITH HOOK 211A Lu ℚ Letterlike Symbols DOUBLE-STRUCK CAPITAL Q 24AC So ⒬ Enclosed Alphanumerics PARENTHESIZED LATIN SMALL LETTER Q 24C6 So Ⓠ Enclosed Alphanumerics CIRCLED LATIN CAPITAL LETTER Q 24E0 So ⓠ Enclosed Alphanumerics CIRCLED LATIN SMALL LETTER Q FF31 Lu Q Halfwidth and Fullwidth Forms FULLWIDTH LATIN CAPITAL LETTER Q FF51 Ll q Halfwidth and Fullwidth Forms FULLWIDTH LATIN SMALL LETTER Q

    Best Regards,

    guy038

  • paste text to the right of cursor

    Oct 6, 2020, 8:34 AM
    1 Votes
    11 Posts
    3k Views

    @Alan-Kilborn thanks a lot - that works perfectly.
    So here the final solution to this thread summarized from above:

    p = editor.getCurrentPos() editor.paste() editor.setEmptySelection(p) editor.chooseCaretX()
  • Reversing blocks of lines

    Oct 24, 2020, 8:53 AM
    0 Votes
    4 Posts
    898 Views

    Awesome idea, I didn’t think of that!
    Thank you so much for the solution and for the step-by-step guide as well. Much obliged.

    Viktória

  • Syntax highlighting updates?

    Oct 23, 2020, 5:23 PM
    1 Votes
    4 Posts
    471 Views

    @ajpanton

    I’m not sure about this case, but I know for certain files, an update won’t change them. This is so that possible user customizations aren’t blown away. The process intends to be “smart” but it isn’t infinitely smart. I believe it errs on the side of caution. Again, not sure about your use case. Maybe someone else knows more about this one.

  • Converting spaces to tabs

    Oct 22, 2020, 10:18 PM
    0 Votes
    4 Posts
    6k Views

    @Alan-Kilborn You are right, it was a python file, so I had to change the setting for python files. Thank you!

  • Notepad Search and repalce - help

    Oct 22, 2020, 9:10 AM
    0 Votes
    10 Posts
    536 Views

    Thanks a Lot. This works fine.

  • 0 Votes
    7 Posts
    577 Views

    @Terry-R wow thanks alot terry ima hop on that later and see if i can start to code you helped me alot thanks and enjoy youre day sincirley -Andre.

  • 0 Votes
    4 Posts
    2k Views

    @DIV-on-github

    I don’t think it can be done with builtin functionality as long as you cannot
    ensure that the backslash is not glued to other chars.
    The only other possibility I see is to use a script like this one with a regex like \\(?=\s) .

  • Notepad verschiebt Spalten

    Oct 21, 2020, 10:00 PM
    1 Votes
    2 Posts
    281 Views

    @Isabelle-Buchmann

    Können Sie bitte die debug-info posten. Ist im letzten Menüpunkt,
    dem Fragezeichenmenu enthalten.

  • Delete near duplicate lines

    Oct 18, 2020, 4:35 PM
    0 Votes
    15 Posts
    2k Views

    @PeterJones Thank you very much!

  • Ease values in-between range

    Oct 21, 2020, 12:39 AM
    0 Votes
    6 Posts
    417 Views

    @Ekopalypse Just got done trying it out, works wonderfully, many thanks :)

  • 0 Votes
    11 Posts
    2k Views

    @guy038 Thank you for help!
    I combined my macro and your two regular expressions into one, now everything works correctly and beautifully! But if the file is large (e.g. 100mb) the macro works for about 30 seconds))).

  • 0 Votes
    5 Posts
    887 Views

    @Terry-R OMG thanks a bunch Terry… It worked perfectly. You saved me!

  • Help for an ANSI file

    Oct 17, 2020, 3:22 PM
    0 Votes
    34 Posts
    8k Views

    @andrecool-68

    But only as long as you have not opened more than the maximum number of files to be saved.

    73679fc4-37eb-4f49-8a16-4a454c69650d-image.png

    Create/maintain some sort of database for this info

    But I see a disadvantage - maintenance. How to keep this kind of db clean. I would say that during runtime of npp one can expect it but
    after a restart it will become a nightmare to keep it clean.
    How would one handle temporarily inaccessible files, moved or deleted files.
    On the other side if you can configure an extension or lexer to always
    open a file in a specific encoding then I assume most of the issues are solved.

  • Search Syntax?

    Oct 20, 2020, 10:52 AM
    0 Votes
    3 Posts
    806 Views

    @schidan

    If you want to restrict the matches to two numbers between pairs of = then I would suggest:

    find: =\d\d(?==)

  • 0 Votes
    8 Posts
    665 Views

    Hello, @petr-andreev, @terry-R, @astrosofista and All,

    @terry-r and @peterjones are right about it. For instance, the first word of your example, Sent is obviously not a proper name but this long sentence could have started with a proper name, too ! Regexes are really not a fair tool to solve semantic problems ;-))

    @Astrosofista, I do like your approach, too ! As for me, I succeeded to build up a regex which catches, “more or less”, all the proper names and compound proper names of the OP’s text !

    I modified your example, adding some dummy text as well as the @peterjones text, for a deeper text. Of course, the first word of any sentence is considered as a proper name. And, although your first sentence, slightly modified, seems to give good results, the @peterjones text, coming next, is not so pertinent !

    Sent by them to the north in search of new lands, the daring daredevils of the Swamp Orkhon, Holokhoi Oyuun, Symattai the Blacksmith, Hara Tumen, Uluu Horo, the elder Omogoy and Ellei Bootur, as well as the general MacArthur, O'Neil the Scotsman , A SpecialNicknameForTest; Cardinal Mazarin, la Marquise de Maintenon, Louis "Le Grand Dauphin" and Louis XIV the Great or Sun King, his father, proceeding from the banks of the Great Ebe from top to bottom and from bottom to top, found three spacious valleys. As a second paragraph, we will follow d'Artagnan on his quest to find the bones of St. Francis of Assisi, along with fictional characters and Dr. Watson, and Bill S. Preston, Esq, and George Wexford-Smyth III. They were really curious whether Dutch cyclist Mathieu van der Poel would lose his "van der", and whether Dutch would be kept because it's a proper adjective (not a proper noun).

    The following regex S/R :

    SEARCH (?x-is).*?(\u[\l\u'."]+(((?!and|or)[^,;.:?!\r\n]){1,5}?\u[\l\u'."]+){0,3})|.+(\R)?

    REPLACE ?1\1(?4:\r\n)

    Would output this text :

    Sent Swamp Orkhon Holokhoi Oyuun Symattai the Blacksmith Hara Tumen Uluu Horo Omogoy Ellei Bootur MacArthur O'Neil the Scotsman SpecialNicknameForTest Cardinal Mazarin Marquise de Maintenon Louis "Le Grand Dauphin" Louis XIV the Great Sun King Great Ebe As Artagnan St. Francis of Assisi Dr. Watson Bill S. Preston Esq George Wexford-Smyth III. They Dutch Mathieu Poel Dutch

    Remark : if you add the new rule that “Any sentence will never begin with a proper name”, it should even be possible to avoid the first word of any sentence ! However, the @peterjones and @Terry-R thoughts should convince you of the limits of regexes, in this matter !

    Test on your real text to see if any other problem occurs ! I do not have time, presently, for explanations of this search regex, but I will, next time !

    See you later,

    Best Regards,

    guy038