• Clean up text of non-printing characters

    9
    0 Votes
    9 Posts
    201 Views
    guy038G

    Hello,@ @m-fessler, @mathlete2, @alan-kilborn, @coises and All,

    @m-fessler, here is, below, a list of all the special Unicode characters which belong, either, to :

    The Z separator category ( Zs, Zl and Zp categories )

    The Cc Control character category ( except for the TAB, LF and CR ones )

    The Cf Format character category

    Two So Other Symbol characters ( \x{FFFC} and \x{FFFD} )

    This list contains 121 characters

    •---------•--------------------•--------------------------------------------•----------•------•--------• | Code | Regex | Character | Abbre. | GC | Chr. | •---------•--------------------•--------------------------------------------•----------•------•--------• | 0000 | \x{0000} | NULL | NUL | Cc | | 0001 | \x{0001} | START OF HEADING | SOH | Cc |  | 0002 | \x{0002} | START OF TEXT | STX | Cc |  | 0003 | \x{0003} | END OF TEXT | ETX | Cc |  | 0004 | \x{0004} | END OF TRANSMISSION | EOT | Cc |  | 0005 | \x{0005} | ENQUIRY | ENQ | Cc |  | 0006 | \x{0006} | ACKNOWLEDGE | ACK | Cc |  | 0007 | \x{0007} | BELL | BEL | Cc |  | 0008 | \x{0008} | BACKSPACE | BS | Cc |  | 000B | \x{000B} | VERTICAL TABULATION | VT | Cc | | 000C | \x{000C} | FORM FEED | FF | Cc | | 000E | \x{000E} | SHIFT OUT | SO | Cc |  | 000F | \x{000F} | SHIFT IN | SI | Cc |  | 0010 | \x{0010} | DATA LINK ESCAPE | DLE | Cc |  | 0011 | \x{0011} | DEVICE CONTROL ONE | DC1 | Cc |  | 0012 | \x{0012} | DEVICE CONTROL TWO | DC2 | Cc |  | 0013 | \x{0013} | DEVICE CONTROL THREE | DC3 | Cc |  | 0014 | \x{0014} | DEVICE CONTROL FOUR | DC4 | Cc |  | 0015 | \x{0015} | NEGATIVE ACKNOWLEDGE | NAK | Cc |  | 0016 | \x{0016} | SYNCHRONOUS IDLE | SYN | Cc |  | 0017 | \x{0017} | END OF TRANSMISSION BLOCK | ETB | Cc |  | 0018 | \x{0018} | CANCEL | CAN | Cc |  | 0019 | \x{0019} | END OF MEDIUM | EM | Cc |  | 001A | \x{001A} | SUBSTITUTE | SUB | Cc |  | 001B | \x{001B} | ESCAPE | ESC | Cc |  | 001C | \x{001C} | FILE SEPARATOR | FS | Cc |  | 001D | \x{001D} | GROUP SEPARATOR | GS | Cc |  | 001E | \x{001E} | RECORD SEPARATOR | RS | Cc |  | 001F | \x{001F} | UNIT SEPARATOR | US | Cc |  •---------•-------------------•--------------------------------------------•----------•------•--------• | 007F | \x{007F} | DELETE | DEL | Cc |  •---------•--------------------•--------------------------------------------•----------•------•-------• | 0080 | \x{0080} | PADDING CHARACTER | PAD | Cc | € | 0081 | \x{0081} | HIGH OCTET PRESET | HOP | Cc |  | 0082 | \x{0082} | BREAK PERMITTED HERE | BPH | Cc | ‚ | 0083 | \x{0083} | NO BREAK HERE | NBH | Cc | ƒ | 0084 | \x{0084} | INDEX | IND | Cc | „ | 0085 | \x{0085} | NEXT LINE | NEL | Cc | … | 0086 | \x{0086} | START OF SELECTED AREA | SSA | Cc | † | 0087 | \x{0087} | END OF SELECTED AREA | ESA | Cc | ‡ | 0088 | \x{0088} | HORIZONTAL TABULATION SET | HTS | Cc | ˆ | 0089 | \x{0089} | HORIZONTAL TABULATION WITH JUSTIFICATION | HTJ | Cc | ‰ | 008A | \x{008A} | VERTICAL TABULATION SET | VTS | Cc | Š | 008B | \x{008B} | PARTIAL LINE DOWN | PLD | Cc | ‹ | 008C | \x{008C} | PARTIAL LINE UP | PLU | Cc | Œ | 008D | \x{008D} | REVERSE INDEX | RI | Cc |  | 008E | \x{008E} | SINGLE-SHIFT 2 | SS2 | Cc | Ž | 008F | \x{008F} | SINGLE-SHIFT 3 | SS3 | Cc |  | 0090 | \x{0090} | DEVICE CONTROL STRING | DCS | Cc |  | 0091 | \x{0091} | PRIVATE USE 1 | PU1 | Cc | ‘ | 0092 | \x{0092} | PRIVATE USE 2 | PU2 | Cc | ’ | 0093 | \x{0093} | SET TRANSMIT STATE | STS | Cc | “ | 0094 | \x{0094} | CANCEL CHARACTER | CCH | Cc | ” | 0095 | \x{0095} | MESSAGE WAITING | MW | Cc | • | 0096 | \x{0096} | START OF PROTECTED AREA | SPA | Cc | – | 0097 | \x{0097} | END OF PROTECTED AREA | EPA | Cc | — | 0098 | \x{0098} | START OF STRING | SOS | Cc | ˜ | 0099 | \x{0099} | SINGLE GRAPHIC CHARACTER INTRODUCER | SGCI | Cc | ™ | 009A | \x{009A} | SINGLE CHARACTER INTRODUCER | SCI | Cc | š | 009B | \x{009B} | CONTROL SEQUENCE INTRODUCER | CSI | Cc | › | 009C | \x{009C} | STRING TERMINATOR | ST | Cc | œ | 009D | \x{009D} | OPERATING SYSTEM COMMAND | OSC | Cc |  | 009E | \x{009E} | PRIVACY MESSAGE | PM | Cc | ž | 009F | \x{009F} | APPLICATION PROGRAM COMMAND | APC | Cc | Ÿ •---------•--------------------•--------------------------------------------•----------•------•--------• | 00A0 | \x{00A0} | NO-BREAK SPACE | NBSP | Zs |   •---------•--------------------•--------------------------------------------•----------•------•--------• | 00AD | \x{00AD} | SOFT HYPHEN | SHY | Cf | ­ •---------•--------------------•--------------------------------------------•----------•------•--------• | 061C | \x{061C} | ARABIC LETTER MARK | ALM | Cf | ؜ •---------•--------------------•--------------------------------------------•----------•------•--------• | 070F | \x{070F} | SYRIAC ABBREVIATION MARK | SAM | Cf | ܏ •---------•--------------------•--------------------------------------------•----------•------•--------• | 0890 | \x{0890} | ARABIC POUND MARK ABOVE | | Cf | ࢐ | 0891 | \x{0891} | ARABIC PIASTRE MARK ABOVE | | Cf | ࢑ •---------•--------------------•--------------------------------------------•----------•------•--------• | 1680 | \x{1680} | OGHAM SPACE MARK | OSPM | Zs |   •---------•--------------------•--------------------------------------------•----------•------•--------• | 180E | \x{180E} | MONGOLIAN VOWEL SEPARATOR | MVS | Cf | ᠎ •---------•--------------------•--------------------------------------------•----------•------•--------• | 2000 | \x{2000} | EN QUAD | NQSP | Zs |   | 2001 | \x{2001} | EM QUAD | MQSP | Zs |   | 2002 | \x{2002} | EN SPACE | ENSP | Zs |   | 2003 | \x{2003} | EM SPACE | EMSP | Zs |   | 2004 | \x{2004} | THREE-PER-EM SPACE | 3/MSP | Zs |   | 2005 | \x{2005} | FOUR-PER-EM SPACE | 4/MSP | Zs |   | 2006 | \x{2006} | SIX-PER-EM SPACE | 6/MSP | Zs |   | 2007 | \x{2007} | FIGURE SPACE | FSP | Zs |   | 2008 | \x{2008} | PUNCTUATION SPACE | PSP | Zs |   | 2009 | \x{2009} | THIN SPACE | THSP | Zs |   | 200A | \x{200A} | HAIR SPACE | HSP | Zs |   •---------•--------------------•--------------------------------------------•----------•------•--------• | 200B | \x{200B} | ZERO WIDTH SPACE | ZWSP | Cf | ​ | 200C | \x{200C} | ZERO WIDTH NON-JOINER | ZWNJ | Cf | ‌ | 200D | \x{200D} | ZERO WIDTH JOINER | ZWJ | Cf | ‍ | 200E | \x{200E} | LEFT-TO-RIGHT MARK | LRM | Cf | ‎ | 200F | \x{200F} | RIGHT-TO-LEFT MARK | RLM | Cf | ‏ •---------•--------------------•--------------------------------------------•----------•------•--------• | 2028 | \x{2028} | LINE SEPARATOR | LS | Zl | 
 | 2029 | \x{2029} | PARAGRAPH SEPARATOR | PS | Zp | 
 •---------•--------------------•--------------------------------------------•----------•------•--------• | 202A | \x{202A} | LEFT-TO-RIGHT EMBEDDING | LRE | Cf | ‪ | 202B | \x{202B} | RIGHT-TO-LEFT EMBEDDING | RLE | Cf | ‫ | 202C | \x{202C} | POP DIRECTIONAL FORMATTING | PDF | Cf | ‬ | 202D | \x{202D} | LEFT-TO-RIGHT OVERRIDE | LRO | Cf | ‭ | 202E | \x{202E} | RIGHT-TO-LEFT OVERRIDE | RLO | Cf | ‮ | •---------•--------------------•--------------------------------------------•----------•------•--------• | 202F | \x{202F} | NARROW NO-BREAK SPACE | NNBSP | Zs |   | 205F | \x{205F} | MEDIUM MATHEMATICAL SPACE | MMSP | Zs |   •---------•--------------------•--------------------------------------------•----------•------•--------• | 2060 | \x{2060} | WORD JOINER | WJ | Cf | ⁠ •---------•--------------------•--------------------------------------------•----------•------•--------• | 2061 | \x{2061} | FUNCTION APPLICATION | (FA) | Cf | ⁡ | 2062 | \x{2062} | INVISIBLE TIMES | (IT) | Cf | ⁢ | 2063 | \x{2063} | INVISIBLE SEPARATOR | (IS) | Cf | ⁣ | 2064 | \x{2064} | INVISIBLE PLUS | (IP) | Cf | ⁤ •---------•--------------------•--------------------------------------------•----------•------•--------• | 2066 | \x{2066} | LEFT-TO-RIGHT ISOLATE | LRI | Cf | ⁦ | 2067 | \x{2067} | RIGHT-TO-LEFT ISOLATE | RLI | Cf | ⁧ | 2068 | \x{2068} | FIRST STRONG ISOLATE | FSI | Cf | ⁨ | 2069 | \x{2069} | POP DIRECTIONAL ISOLATE | PDI | Cf | ⁩ | 206A | \x{206A} | INHIBIT SYMMETRIC SWAPPING | ISS | Cf |  | 206B | \x{206B} | ACTIVATE SYMMETRIC SWAPPING | ASS | Cf |  | 206C | \x{206C} | INHIBIT ARABIC FORM SHAPING | IAFS | Cf |  | 206D | \x{206D} | ACTIVATE ARABIC FORM SHAPING | AAFS | Cf |  | 206E | \x{206E} | NATIONAL DIGIT SHAPES | NADS | Cf |  | 206F | \x{206F} | NOMINAL DIGIT SHAPES | NODS | Cf |  •---------•--------------------•--------------------------------------------•----------•------•--------• | 3000 | \x{3000} | IDEOGRAPHIC SPACE | IDSP | Zs |   •---------•--------------------•--------------------------------------------•----------•------•--------• | FEFF | \x{FEFF} | ZERO WIDTH NO-BREAK SPACE | ZWNBSP | Cf |  •---------•--------------------•--------------------------------------------•----------•------•--------• | FFF9 | \x{FFF9} | INTERLINEAR ANNOTATION ANCHOR | IAA | Cf |  | FFFA | \x{FFFA} | INTERLINEAR ANNOTATION SEPARATOR | IAS | Cf |  | FFFB | \x{FFFB} | INTERLINEAR ANNOTATION TERMINATOR | IAT | Cf |  •---------•--------------------•--------------------------------------------•----------•------•--------• | FFFC | \x{FFFC} | OBJECT REPLACEMENT CHARACTER | OBJ | So |  | FFFD | \x{FFFD} | REPLACEMENT CHARACTER | ? | So | � •---------•--------------------•--------------------------------------------•----------•------•--------• | 1BCA0 | \x{D82F}\x{DCA0} | SHORTHAND FORMAT LETTER OVERLAP | SFLO | Cf | 𛲠 | 1BCA1 | \x{D82F}\x{DCA1} | SHORTHAND FORMAT CONTINUING OVERLAP | SFCO | Cf | 𛲡 | 1BCA2 | \x{D82F}\x{DCA2} | SHORTHAND FORMAT DOWN STEP | SFDS | Cf | 𛲢 | 1BCA3 | \x{D82F}\x{DCA3} | SHORTHAND FORMAT UP STEP | SFUS | Cf | 𛲣 •---------•--------------------•--------------------------------------------•----------•------•--------•

    From this list, @m-fessler, which characters do you want to Search / Mark / Replace ?

    Moreover, do you want to ignore all characters above the BMP ( so, over \x{FFFF} ) or do you consider these characters as normal chars ?

    Once, you’ll know which characters you want to consider, it will be easy to get the appropriate REGEX search !

    Best Regards,

    guy038

  • .tab files are opening as toml files. How do I fix this?

    9
    0 Votes
    9 Posts
    108 Views
    mathlete2M

    @PeterJones not a big deal, but a more accurate quote of my reply would have been “[we] actually referenced…”. I understand where the inadvertent mistake was made, but technically, the current quote implies that I was claiming to have referenced two different files within my responses (specifically, the ones prior to the one that you quoted me from), which isn’t true.

    Either way, thanks for explaining the relationship between those two files! You’re quite right to suggest that I hadn’t looked this up yet. Knowing this dynamic now, and given that the OP didn’t actually specify which file(s) he had already looked at, it would have been a good idea to ask him to clarify this; it’s possible that he was looking at the same file that I was, and that the one that you mentioned has the TOML configuration that he was expecting to find.

  • Need to set tab STOPS, not spacing.

    22
    0 Votes
    22 Posts
    3k Views
    Alan KilbornA

    @Coises said :

    If what you want is for the tab key to insert a number of spaces,

    I guess we’re still unsure of what the posters that showed interest really want…

    include the ability to specify the exact tabstops for different file types and activate based on the file extension and/or the language. I don’t know if that degree of complexity is practical in a script.

    It’s certainly not a problem to script something like that.

  • Broken emoji

    5
    0 Votes
    5 Posts
    237 Views
    Hosein GSDH

    @PeterJones
    thank you so much for your detailed answer 🙏

    Actually the problem was with the output files of this chrome extension.
    I wrote a comment for that and today I used it again and noticed that it’s problems is solved.

    (before that, I treied to solve many problems using regex manually which was useful for things like & but not for things like like 💀. )

    @guy038 said in Broken emoji:

    I think that the clever @peterjones’s method can be recorded as a N++ macro !

    absolutely!

  • 0 Votes
    8 Posts
    958 Views
    Vladimír KordíkV

    @xomx Hello. I’m trying this solution DPI settings and it’s not working. I’ve tried all the options, including Application, System, and System (Enhanced).

  • Search for character classes but not replace them

    51
    0 Votes
    51 Posts
    4k Views
    guy038G

    Hi, @coises and All,

    You said,

    My thought is that it should be the same things Scintilla recognizes as line breaks and the Notepad++ documentation states: just \n and \r.

    I think that this reasoning is the right one ! More over, note that we use the same reasoning when we want to find all chars but a specific one, in each single line : we use the regex [^c\r\n], where c is the character we do not want to !

    Thus, against my Total_Chars.txt file, the regex (?s). should return 325,590 occurrences and the regex (?-s). should return 325,588 occurrences

    Now, regarding my question :

    Just because you do not allow backward searches when choosing the Regular expression search mode ! May be you could add it among all the Columns++ options ?

    I do understand all the reasons why you are not inclined to do so ! However, note that, as regularly using the regexBackward4PowerUser="yes" option, in the FindHistory node of the config.xml file, I can assure you that a lot, but not all, of regexes can be processed in backward direction ! Unfortunately, with our present Boost regex engine, you can verify my assertion :

    Backward regex searches, for NON ANSI files, stops as soon as it matches a character with code-point over \x{007F}

    I also tested the search of invalid UTF-8 bytes. To do so :

    Open a new N++ tab. ( I assume that its current encoding is UTF-8 ! )

    Run the Encoding > Convert to ANSI menu option

    Paste the text below, in this new ANSI tab

    ABC ퟿ XYZ \x{D7FF} ED 9F BF LAST valid char BEFORE Surrogates range ABC í € XYZ \x{D800} ED A0 80 FIRST SURROGATE char ABC í¿¿ XYZ \x{DFFF} ED BF BF LAST SURROGATE char ABC  XYZ \x{E000} EE 80 80 First valid char AFTER Surrogates range ABC € XYZ ABC  XYZ ABC ‚ XYZ ABC ƒ XYZ ABC „ XYZ ABC … XYZ ABC † XYZ ABC ‡ XYZ ABC ˆ XYZ ABC ‰ XYZ ABC Š XYZ ABC ‹ XYZ ABC Œ XYZ ABC  XYZ ABC Ž XYZ ABC  XYZ ABC  XYZ ABC ‘ XYZ ABC ’ XYZ ABC “ XYZ ABC ” XYZ ABC • XYZ ABC – XYZ ABC — XYZ ABC ˜ XYZ ABC ™ XYZ ABC š XYZ ABC › XYZ ABC œ XYZ ABC  XYZ ABC ž XYZ ABC Ÿ XYZ ABC   XYZ ABC ¡ XYZ ABC ¢ XYZ ABC £ XYZ ABC ¤ XYZ ABC ¥ XYZ ABC ¦ XYZ ABC § XYZ ABC ¨ XYZ ABC © XYZ ABC ª XYZ ABC « XYZ ABC ¬ XYZ ABC ­ XYZ ABC ® XYZ ABC ¯ XYZ ABC ° XYZ ABC ± XYZ ABC ² XYZ ABC ³ XYZ ABC ´ XYZ ABC µ XYZ ABC ¶ XYZ ABC · XYZ ABC ¸ XYZ ABC ¹ XYZ ABC º XYZ ABC » XYZ ABC ¼ XYZ ABC ½ XYZ ABC ¾ XYZ ABC ¿ XYZ ABC À XYZ ABC Á XYZ ABC  XYZ ABC à XYZ ABC Ä XYZ ABC Å XYZ ABC Æ XYZ ABC Ç XYZ ABC È XYZ ABC É XYZ ABC Ê XYZ ABC Ë XYZ ABC Ì XYZ ABC Í XYZ ABC Î XYZ ABC Ï XYZ ABC Ð XYZ ABC Ñ XYZ ABC Ò XYZ ABC Ó XYZ ABC Ô XYZ ABC Õ XYZ ABC Ö XYZ ABC × XYZ ABC Ø XYZ ABC Ù XYZ ABC Ú XYZ ABC Û XYZ ABC Ü XYZ ABC Ý XYZ ABC Þ XYZ ABC ß XYZ ABC à XYZ ABC á XYZ ABC â XYZ ABC ã XYZ ABC ä XYZ ABC å XYZ ABC æ XYZ ABC ç XYZ ABC è XYZ ABC é XYZ ABC ê XYZ ABC ë XYZ ABC ì XYZ ABC í XYZ ABC î XYZ ABC ï XYZ ABC ð XYZ ABC ñ XYZ ABC ò XYZ ABC ó XYZ ABC ô XYZ ABC õ XYZ ABC ö XYZ ABC ÷ XYZ ABC ø XYZ ABC ù XYZ ABC ú XYZ ABC û XYZ ABC ü XYZ ABC ý XYZ ABC þ XYZ ABC ÿ XYZ Now, choose the Encoding > UTF-8 encoding. So all characters of this ANSI file are re-interpreted as they were UTf_8 chars

    => You should see, between the strings ABC and XYZ :

    -The last VALID UTF-8 char ( ED 9F BF ) before the SURROGATE range

    The 3-bytes sequence of the first SURROGATE char, which is an INVALID sequence

    The 3-bytes sequence of the last SURROGATE char, which is an INVALID sequence

    The first VALID UTF-8 char ( EE 80 80 ) after the SURROGATE range

    Then, a list of the 128 IVALID UTF-8 characters as the UTF-8 encoding does NOT allow any 1-byte character OVER \x{007F} !

    Now :

    Move the caret to the first empty line

    Run the option Plugins > Columns++ > Search...

    Enter the range [\x{DC80}-\x{DCFF}] in the Find what : zone

    Click on the Find First button

    =>

    The Search region is set to the entire document

    The first INVALID byte \xED is selected

    Click on the Find Next button => It will select, one after another, all the other IVALID UTF-8 characters of this new tab !

    So, @coises, your new implementation works correctly, regarding the INVALID UTF-8 chars and I’m longing for your second experimental version ;-))

    Best Regards,

    guy038

  • Notepad++ RegEx question

    4
    0 Votes
    4 Posts
    111 Views
    guy038G

    Hello, @smudge-the-cat, @mkupper and All,

    @mkupper, if we’re certain that each record contains, both, the 2025-02-12 date and a name, an other solution could be :

    FIND / MARK (?-is)(?=.*2025-02-12)(?=.*(Soradesuu|Setokaiba|.......|Sauron80|Karim_Dommez)).+

    In other words, it would match, from beginning of line, all the line contents ONLY IF, BOTH :

    It contains the 2025-02-12 date

    It contains a name of the list, with the same case, between parentheses which can be re-used as ${1}, if necessary

    Best Regards,

    guy038

  • Cursor become black square at line selection

    5
    0 Votes
    5 Posts
    232 Views
    N

    @mpheath
    Yeah same thing there although I doubt it’s a bug on their side. When I force Intel’s built-in GPU the mirror arrow displays correctly. Without my intervention AMD does everything hence the black square.
    Since both chips and their drivers are from the same year I presume AMD’s drivers are to blame. They’re latest since ages ago so I can’t simply update them. They had a rather sloppy period around that time (and technical standards were very dynamic) and one the symptoms are hardware cursors such as this example.

    For that reason it makes little sense to file a ticket to support faulty and obsolete technology. It would take away from devs time to support a handful of such old (don’t ask) PC configurations that still exist. This one is on its last legs as well so the problem is about to fix itself soon enough :)

    If it were a real bug I suspect a lot more people would react so no biggie. Thanks for the links btw, it was interesting to see how Scintilla and N++ are connected, I had no idea.

  • Massive list and massive search and replace?

    23
    0 Votes
    23 Posts
    6k Views
    Yurble VươngY

    @Alan-Kilborn

    Many thanks for help

  • Is there a way to move columns down?

    10
    0 Votes
    10 Posts
    248 Views
    guy038G

    Hello, @dochbert, @ekopalypse, @terry-r, @Coises, @mark-olson and All,

    Mark, from your INPUT text :

    |Date|Percentage| |:-|:-| |February 9|0.30769230769231%| |February 10|0.30864197530864%| |February 11|19%| |February 14|0.3125%| |February 15|0.31347962382445%| |February 16|0.31446540880503%| |February 17|0.31545741324921%| |February 18|5%| |February 22|| |Blerun 33|15.7934343%| |rkejrkej 22|| |rjerkjekre 33333|78.334343%| |rekerkekre |99.4444%| |jgkjgkf|| |yiowpwk||

    If we delete the two last lines |jgkjgkf|| and |yiowpwk||, then, after running your search-replacement, I got this text:

    |Date|Percentage| |:-|:-| |February 9|| |February 10|0.30769230769231%| |February 11|0.30864197530864%| |February 14|19%| |February 15|0.3125%| |February 16|0.31347962382445%| |February 17|0.31446540880503%| |February 18|0.31545741324921%| |February 22|5%| |Blerun 33|| |rkejrkej 22|15.7934343%| |rjerkjekre 33333|| |rekerkekre |78.334343%99.4444%|

    Note that the last line is not exact and should be |rekerkekre |78.334343%| only

    Thus, I tried to solve this problem and here is a generalization of your method !

    Let’s suppose we have this text :

    |Year|Month|Day|Percentage| |:-|:-|:-|:-| |2025|February|10|0.1%| |2025|February|11|0.2%| |2025|February|12|| |2025|February|13|0.4%| |2025|February|14|0.5%| |2025|February|15|| |2025|February|16|| |2025|February|17|0.6%| |2025|February|18|0.7%| |2025|February|19|0.8%|

    And that we want to move all text of the column 4 downwards

    Note that the last line |2025|February|19|0.8%| is followed with a line-break which ends the file contents !

    First, with this first regex S/R, we replace any | character, except for the first one and the last two containing the percentage value, by a ! char

    FIND (?!^)\|(?=.+\|.*?\|$)

    REPLACE !

    So our INPUT text is changed as :

    |Year!Month!Day|Percentage| |:-!:-!:-|:-| |2025!February!10|0.1%| |2025!February!11|0.2%| |2025!February!12|| |2025!February!13|0.4%| |2025!February!14|0.5%| |2025!February!15|| |2025!February!16|| |2025!February!17|0.6%| |2025!February!18|0.7%| |2025!February!19|0.8%|

    Now, we apply the main regex S/R :

    FIND (?-s)(\d+(?:\.\d+)?%)?(\|\R\|.*?\|)|(?:[^%\r\n]+%(?=\|\R\z))

    REPLACE ${2}${1}

    Running that S/R once, we get :

    |Year!Month!Day|Percentage| |:-!:-!:-|:-| |2025!February!10|| |2025!February!11|0.1%| |2025!February!12|0.2%| |2025!February!13|| |2025!February!14|0.4%| |2025!February!15|0.5%| |2025!February!16|| |2025!February!17|| |2025!February!18|0.6%| |2025!February!19|0.7%|

    Then, if desired, you may again re-run this regex S/R and it returns :

    |Year!Month!Day|Percentage| |:-!:-!:-|:-| |2025!February!10|| |2025!February!11|| |2025!February!12|0.1%| |2025!February!13|0.2%| |2025!February!14|| |2025!February!15|0.4%| |2025!February!16|0.5%| |2025!February!17|| |2025!February!18|| |2025!February!19|0.6%|

    And… after some clicks on the Replace All button, you should get :

    |Year!Month!Day|Percentage| |:-!:-!:-|:-| |2025!February!10|| |2025!February!11|| |2025!February!12|| |2025!February!13|| |2025!February!14|| |2025!February!15|| |2025!February!16|| |2025!February!17|| |2025!February!18|| |2025!February!19||

    Finally, the trivial S/R

    FIND !

    REPLACE |

    Would replace all the ! chars by the separator character

    Best Regards,

    guy038

  • Search and Replace with PythonScript compared to built-in

    9
    0 Votes
    9 Posts
    200 Views
    Wim GielisW

    @Mark-Olson

    Thank you, then I leave it in the code.

  • Change colors in console window open after Find All in Current Document

    16
    0 Votes
    16 Posts
    2k Views
    PeterJonesP

    Sorry, @Reggie-Wherry,

    You have misunderstood the question from 6 years ago. They were asking about the Search Results panel; your answer is talking about how to change settings for the NppExec plugin’s console panel, so is irrelevant to the original, already-answered question.

  • WebEdit Plugin for NPP x64 ?

    4
    0 Votes
    4 Posts
    230 Views
    rdipardoR

    Hey @Sam-Cem, or anybody watching this thread: 64-bit WebEdit is now ready to use, for x64 and ARM: https://github.com/npp-dotnet/WebEdit/releases/tag/v2.7.rc.1

    No plans for an official release until a licensing issue gets resolved.

  • 0 Votes
    18 Posts
    2k Views
    Patrick 909P

    @PeterJones

    perfect!

  • Save unsaved files to a folder

    6
    1 Votes
    6 Posts
    127 Views
    Wim GielisW

    @Alan-Kilborn
    Thank you for the feedback.

    I made changes to this:

    import os import re from Npp import notepad, editor SAVE_FOLDER = r'D:\_\Notepad++tabs' FILE_PATTERN = r'^\d{2}\.txt$' if os.path.exists(SAVE_FOLDER): counter = sum(len([file for file in files if re.compile(FILE_PATTERN).search(file)]) for _, _, files in os.walk(SAVE_FOLDER)) else: os.makedirs(SAVE_FOLDER) counter = 0 for (full_file_name, bufferID, file_index, view) in notepad.getFiles(): notepad.activateBufferID(bufferID) do_saveas = True if os.path.isfile(full_file_name) and os.sep in full_file_name: if os.path.exists(full_file_name): notepad.save() do_saveas = False if do_saveas: counter += 1 new_file_path = os.path.join(SAVE_FOLDER, f"{counter:02}.txt") notepad.saveAs(new_file_path)

    Best regards,

    Wim

  • 0 Votes
    18 Posts
    774 Views
    xomxX

    @Mark-Colvin said in Notepad++ v8.7.1 (32-bit) NppShell.dll is intermittently crashing Windows Explorer.:

    How does this compatibility mode affect the Explorer context menu invocations?

    Good point, this probably influences the N++ app only and not the NppShell extension DLL invoked by the shell Explorer.

  • Can't add directories to workspace project

    2
    0 Votes
    2 Posts
    78 Views
    PeterJonesP

    @WolfyRed ,

    I understand that you are upset, but unforuntately, as a fellow user of Notepad++, all I can tell you is that you are trying to do something without first understanding how the Workspace/Project feature works, and what you appear to be trying to do is not possible in the Workspace/Project feature, hence your confusion and frustration.

    As the user manual explains, in the project panel, a “folder” is just a container inside your project, and does not 1:1 correspond to a specific “directory” on your file storage. Specifically, if you want to have a folder under your project, and have it access all the files currently in a specific directory on your computer, you need to Add folder, which adds an empty folder; to populate that folder, you can then right click on that folder, and Add files from directory…, which will add all the files currently in the chosen computer directory into your project’s folder (and if you don’t want all the files, but just a subset, you could use Add files… – the command you already mentioned – instead). But without adding files using one of the two commands, there will be no files in your project. This is the way the Workspace/Project feature of Notepad++ was designed.

    Please note that I’m careful to say “currently in a specific directory”: the Workspace/Project feature does not automatically update one of its projects or folders to include new files that have been added to any computer directory, nor to remove files from the projects or folders that have been removed from your computer’s directory. It’s a static list that you can add to or remove from manually.

    The “Workspace/Project” feature of Notepad++ is intended as a way for you to manually group disparate files, not necessarily from one computer directory, into a logical/virtual group, which you can save the list of files, and load it again later. No “project” or “folder” within this feature is synced to any specific location or directory hierarchy on your computer. (it’s somewhat the same concept as a project in Visual Studio, where you have to manually add or remove files from the project, even if the directory containing those files has been updated to include more or fewer files; in VS, you can also create a “folder” in your project, where you can put files from throughout your sourcecode tree, regardless of what directory they were part of originally; so in a way, other than the compiling features that VS provides, it’s very much like the project inside a VS solution.)

    If you want a similar panel in Notepad++, but one that automatically tracks one or more computer directories (in a hierarchical manner), rather than manually putting together a static list of files for your project, I recommend “Folder As Workspace” (“FaW”), in which you can add one or more computer directories for the FaW panel to track. This feature doesn’t allow you to arbitrarily organize the files like you can in a project panel, but it does automatically track one or more directories in your panel.

    Unfortunately, your description of your search implies that you are using the “Find in Project” feature, which is something that doesn’t have an exact duplicate for the FaW feature. The Find in Files search tab comes close, because it can search any single directory (or recursive directory, depending on your options), but it will not be able to automatically pick the top level directory from FaW (though you can easily get Find in Files to start searching in the directory where the active file is, and can quickly modify that start-in-directory to go up a directory or two)

    But, unfortunately for you, it doesn’t look like either FaW or Workspace/Project features will do everything that you want it to; so you’ll have to pick which subset of features are most important to you (if syncing to the actual computer filesystem is most important, pick FaW; if being able to Find In Project is most important and the one-directory or one-recursive-directory available through Find In Files isn’t sufficient for you, you might need to live with the limitations of Workspace/Project, instead of using FaW)

    No, I don’t know why the developer implemented those two Panels separately, rather than just allowing the Project feature to either set a Folder to always “track” a directory or to be a “manual” folder instead; he has resisted all requests to combine the best of both features into a single unified user experience, unfortunately. Which means that neither FaW nor Workspace/Project will have all the features that many users want from the same feature in Notepad++, annoying users who want all the features from both Panels in one place. Sorry.

  • How to save 2000 files at once

    17
    0 Votes
    17 Posts
    12k Views
    PeterJonesP

    @Turuseutas ,

    I use Notepad++ only for note-taking. Sometimes I write, and other times I open a new tab to copy things to read later. On some days, I might create 0 to a few tabs, while on other days, I could create 10 or even 20 tabs just by clicking.

    I might suggest installing the plugin called TakeNotes. Its description as shown in the Plugins Admin:

    Helps people who like to use Notepad++ for jotting quick notes. Instead of using unnamed ‘new ?’ files, this plugins allows to quickly create new empty files in a folder of choice. The file names may be custom generated using a mask and may contain details such as the user name, date, and time of creation so that unique files may be generated. Additionally, the plugin allows to load exiting notes in the folder of choice, save existing files as a note, and open the last saved note quickly. Please refer to the Options dialog box for more details. It is strongly recommended to use this plugin in combination with AutoSave to make sure that you never loose a note.

    Based on your description, this plugin (especially combined with the author’s AutoSave plugin) will provide you with both the functionality you seem to want, plus the safety of always having your files saved somewhere rather than just relying on the session-snapshot+periodic-backup

    Perhaps they might not notice the explanation in the bottom corner of the screen?

    Users might overlook a short message that appears in the bottom corner

    I am confused how that can happen. When I use my dummy account with no reputation to start a new post, I see:
    4de2589a-cb56-4156-a027-e96ac4189a9f-image.png

    The big purple message box doesn’t just “disappear”. I have to manually click the X to be able to start typing my first post in that account. If you choose to ignore the contents of the box and just click the X, there’s not much I can do from a User Interface perspective to stop you from doing that. When I do click the X and then type and try to post, I see the “temporary” popup in the corner for about 10-15sec. But even if I missed that one, there was still the big purple box that was there when I first posted. If I try to make a second post before my earlier one is approved, because I didn’t see my first, I see the big purple box again, that I again have to click X on. And if I get a first post approved, when I try to make a second real post with no reputation, I still get the big purple box.

    Are you sure you’re not getting that box every time, and just clicking X without reading it? (If you are using a different color scheme in the forum, it might not be “purple”, but it should get in the way of you entering any post.)

  • Language, User Defined

    9
    0 Votes
    9 Posts
    257 Views
    Lycan ThropeL

    @Dennis-Bareis ,
    You have to understand, the UDL uses a complex, but pretty thorough general purpose lexer that anyone that takes the time to learn the UDL documentation and system, (and it doesn’t happen overnight) can make some pretty good User Defined Language Packages. I say package, because right now, short of the Visual UI designer in my dBASE IDE, I can use Notepad++ for a damn good IDE. It took me about a year to complete (not constantly working on it) the UDL and it includes several customizations of NPP basic features to do it.

    Syntax Highlighting - basic, I’m working on advanced now. Auto Completion - Entire language documented and hints available FunctionList - Entire language Class/Method/Functions usable for navigation Popup Context Menu that has the dark/light language options selectable and will soon include multiple versions of our legacy language UDL’s with options chosen by right click navigation. Snippets - Setup with our language specific code for pasting UDL Specific Macros for Header insertions Plugins that allow this development environment to process things that our IDE doesn’t even touch, with the option to use other plugins Theme, dark mode, color control, that our IDE lacks…etc. Replace the NPP help F1, that calls up the dBASE Help documentation

    The list can go on. Everyday I learn things. Look at it like this. If you want to make a quality UDL for yourself…slow down and take the time to learn this system, so that short of writing your own Lexer/Parser you can make a pretty good package fairly quickly.

    dBASE, that I made the package for, is more difficult for the UDL to address all things, because it’s a loose language that allows some legacy procedural code, Visual UI creation, database manipulation language, OOP Object’s and language etc. So if I can figure this out, you can. I’m no Einstein, but I had a lot of persistence, an open and positive attitude wanting to learn all of this from scratch, including learning NPP’s version of regex and regex in general.
    But try not to come here frustrated because you don’t get a red carpet roll out of how to do things. It’s not easy being a product that can do a lot for a lot of people. Maybe not everything, but so far I’ve found the only thing lacking here, is my own knowledge of how to do it…and that’s what you have to understand. You’re learning their eco system…so try to learn it and not complain about what you don’t understand yet. Please. You get more bees with honey, than vinegar.

  • Notepad ++ XML Plugin

    3
    0 Votes
    3 Posts
    138 Views
    Mark OlsonM

    @Jana-Laster said in Notepad ++ XML Plugin:

    We have previously used Notepad ++ to do transforms without issue.

    I am assuming you were using a plugin to do these transformations. Which plugin, and which command within that plugin? Which version of Notepad++?

    I suppose you could have been committing the unspeakable atrocity that is editing HTML with regex, but I don’t want to accuse you of such a grievous crime without evidence.