• regexp to match comma(s) end of line

    18
    0 Votes
    18 Posts
    11k Views
    guy038G
    Hello, @patrickdrd, In a pevious post, you said : anyway, I’m posting one of my such files to take a look yourselves if and whoever has some time, thanks! https://pastebin.com/raw/rFi6heCt So, I downloaded your file and, after studying it two days, I’m happy to email you back both the original file and the new one, with my formatting :-)) I succeeded to transform all your data in 9 tables, described below : •----------•---------•---------• | Fields | Width | Lines | •----------•---------•---------• | 10 | 9,849 | 466 | | 4 | 146 | 43 | | 19 | 1,565 | 216 | | 2 | 154 | 15 | | 12 | 9,008 | 169 | | 12 | 5,992 | 89 | | 9 | 8,346 | 21 | | 9 | 226 | 39 | | 7 | 381 | 487 | •----------•---------•---------• REMARK : Just one record is still odd. You can get this record by searching the regex \x{203D}{3} I also rename this OUTPUT text file as an Lua file, in order to get a general folding, which does not interfere with your file contents ! Finally, I verified that the number of chars ( 339,792 ) is identical between your original file Patrick_BEFORE.txt and the transformed file Patrick_AFTER.lua, with the regex (?![,| \[\]•\x{203D}\r\n-])[\x{0000}-\x{D7FF}\x{E000}-\x{FFFF}], which covers all the BMP Unicode plane, except for the 10 characters below : , | \x20 [ ] • ‽ \r \n - I do hope that my work will be benefic to you, in some way ! Best Regards, guy038
  • Same action on the (same) highlighted sections

    10
    0 Votes
    10 Posts
    977 Views
    Alan KilbornA
    @Andi-Kiissel said in Same action on the (same) highlighted sections: So Ctrl+Shift+… and Shift+Ctrl+… different behaviour would be acceptable too… Sorry, not for me. Sorry, don’t know what you mean.
  • How to define a default "Save as...." directory?

    7
    0 Votes
    7 Posts
    3k Views
    D
    @Claudia-Svenson This seems to be exactly I want. Hey did you follow up and create the feature request? Or did you find any workaround?
  • there is data left after the program was uninstalled

    4
    0 Votes
    4 Posts
    1k Views
    Jane MischenkoJ
    Debug Info! Debug info is what I needed! It was installed for some reason in program files/npp/ … Why here… ) But well, the main thing is that I finally found where the launch came from and now I know how to search. Thanks!
  • Remove line breaks on lines ending with commas

    3
    0 Votes
    3 Posts
    5k Views
    Dennis PayallD
    Thanks!! Two years too late! - I have struggled with this for the past years - I just hadnt seen your answer… Thanks Again!!
  • Unicode characters as delimiters in UDL

    3
    0 Votes
    3 Posts
    624 Views
    MarionM
    @PeterJones This is perfect – thank you so much for your help!
  • 0 Votes
    16 Posts
    8k Views
    notdodgeballN
    @PeterJones Much appreciated A few links for better understanding or future reference in the event or of a dev wanting to take a chance. https://w3c.github.io/uievents-code/ https://jsfiddle.net/v1gz5c5m/1/ https://github.com/Microsoft/node-native-keymap
  • Notepad++ crash (v8.4 through v8.6.4)

    7
    1 Votes
    7 Posts
    3k Views
    vad RV
    @Michael-Vincent Thanks!
  • I want to fold in text files.

    folding txt files
    7
    0 Votes
    7 Posts
    5k Views
    PeterJonesP
    @Luis-Piña-III said in I want to fold in text files.: How do I set an extension for TXT? Once you’ve saved your UDL, when you look at the Language > User Defined Language > Define your language… dialog box and have that language selected, you get a Ext: box, where you can type txt to define that *.txt will be interpreted as your UDL. (You can see this box in my screenshot in my first reply, above.) https://npp-user-manual.org/docs/user-defined-language-system/#udl-dialog-box-or-window
  • [SOLVED] Extract the last number of each line

    5
    0 Votes
    5 Posts
    1k Views
    PeterJonesP
    @mike69290 said in [SOLVED] Extract the last number of each line: Omg found it! I was looking in the menus. It’s also in the menus: Search > Copy Styled Text > Find Mark Style Moreover the button is not translated in my language. You might want to check to see if you’ve just got an outdated translation file. Often, config files don’t get overwritten when you do an update. I recommend that you try downloading the most recent zipped edition, and grab the most recent copy of your localization file from there. But when I searched the localization files for v8.6.4 portable, it appears that only 39 of the 92 localization files have <Item id="1725"… so yes, there is a good chance that string (and many others) haven’t made it into your specific localization. Notepad++ relies on volunteers to submit translations, and some of the translations aren’t as active as others. (While the author of Notepad++ knows at least 3 languages fluently (as far as I can tell), I’m sure he doesn’t know all 92 of the localization languages , so cannot keep them up to date without outside help).
  • More than eight keyword lists for User Defined Language?

    5
    0 Votes
    5 Posts
    879 Views
    EkopalypseE
    @HydraheadHunter said in More than eight keyword lists for User Defined Language?: Currently it only highlights words when I make an edit to the config file This is a kind of “live preview function” that makes it easier for users to see whether a particular regex is doing what it is supposed to do. It also gives hints if a regex is wrong or if there are overlaps with the actual lexer. As soon as you save and close the ini file, the regex rule is also applied to the configured buffers. If you think something is not working as expected, feel free to report a bug here.
  • How to bookmark lines with certain characters in certain positions

    5
    0 Votes
    5 Posts
    2k Views
    Brian Y.B
    Gotcha. Thanks so much, that will really help.
  • Removing characters in a certain position on the line

    3
    0 Votes
    3 Posts
    849 Views
    DIMITRIOS STAMATIOUD
    @Mark-Olson, Thank you so much, you saved me from many hours of work. Much Appreciated.
  • Unwanted multiple confirmations for replace in all files

    7
    0 Votes
    7 Posts
    1k Views
    Alan KilbornA
    @Entropiemaximun said in Unwanted multiple confirmations for replace in all files: so i can do an arduino fake keyboard to do it If that works for you, then I suppose you can.
  • UDL folded comment spontaneously unfolds

    2
    0 Votes
    2 Posts
    512 Views
    PeterJonesP
    @Blind-SQuirreL , Yep, my experiments show the behavior. You have found yet another bug in UDL. Too bad there have been no bug fixes or feature improvements in UDL in years, so even if you made an official bug report, I doubt anything would ever happen with it. (There are other longstanding UDL bugs dealing with comments and folds. FOr example, if you have one or more single-line comments at the beginning of the file, any folding that happens afterward might be off-by-one-or-more-lines from where it should be.) As a workaround, I suggest not using the multi-line comment definition if you want to fold that section of text; instead, use Folding in Code Style 1 if you can – or Style 2 if you’ve already used Style 1 (and are able to have newlines or spaces before and after your { and } indicators ).
  • Scroll and search through keyword lines by alphabetical order?

    4
    0 Votes
    4 Posts
    530 Views
    Alan KilbornA
    @Alan-Kilborn said in Scroll and search through keyword lines by alphabetical order?: ^\w-$ I intended it to be ^\w+-$ but the + got lost somehow. :-(
  • How to convert scientific notation to standard?

    8
    0 Votes
    8 Posts
    4k Views
    Mark OlsonM
    This regex will capture all scientific notation numbers, and can also handle leading + signs and number with leading decimal points: ([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?) Seriously, everyone should just write that down somewhere so they can look it up in times of need.
  • Unicode 'ÿ' , problem converting to Hex 'FF'

    36
    1
    1 Votes
    36 Posts
    10k Views
    rdipardoR
    @LanceMarchetti said in Unicode 'ÿ' , problem converting to Hex 'FF': int val = static_cast<unsigned char>(selText.getChar(i)); I’m afraid this type cast will corrupt data if any character ordinal is greater than 0xFF, e.g. ġ. See, for example: Fix character truncation bug that lead to ‘ġ’ styled as an operator since its low 8 bits are equal to ‘!’ selText.getChar already returns an int, which is 32-bits wide, so more than enough for any ASCII or Unicode ordinal. The real issue is the declaration of SelectedString::_str as char *, which limits every representable “byte” to a maximum ordinal value of 0x7F. It should be the generic TCHAR * type, which becomes wchar_t * when the _UNICODE compile-time definition is set (as it always has been ever since Notepad++ became a Unicode application about 17 years ago). A wchar_t is 16 bits, which would accommodate “extended” 8-bit ASCII as well as the East Asian double-byte character sets that remain popular with some users.
  • Replacing many occurences of different text blocks

    8
    0 Votes
    8 Posts
    3k Views
    PeterJonesP
    @No-Nope said in Replacing many occurences of different text blocks: npp-user-manual page on regular-expressions, but I only found references to the tabs in the seearch/replace dialogue. Interesting. Yes, there are 68 matches, and the ones near the top of the Searching page are all about which tab of the Find/Replace/Mark dialog you are on – but that’s because the user interface for searching is what’s described first in the Searching page. But as soon as you go into the actual Regular Expression section of that page, it’s the third match (the other two being “table” and “comfortable”), and it’s a line that literally uses the word “tab” four times. [image: 1709492490143-5062f77a-de74-42bf-9fcb-420d42bcd147-image.png] I’d make it easier to find if I could, but I don’t see any way to better help people find the regular expression syntax for the tab character than to put it in the section on regular expressions and use both “tab” and “character” in the description. I’m sorry that wasn’t enough for you to find it.
  • 0 Votes
    4 Posts
    472 Views
    dr ramaanandD
    @PeterJones OK, thanks, I could manage the rest.