• 0 Votes
    3 Posts
    1k Views
    Jim DaileyJ

    @Rangan-Roy Explore the Settings->Style Configurator dialog box. Note you can change the way various language-specific items appear.

  • Select Large Area

    Locked
    3
    0 Votes
    3 Posts
    4k Views
    Jim DaileyJ

    @Randy-Reist You can also mark a small bit of the text, then use the mouse to pull the scroll bar down to where you want to end the selection. Hold down the Shift key and left-click the mouse to extend the selection to wherever your mouse cursor is.

  • **Plugin Manager**

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    PeterJonesP

    Due to the embedded ad (see NppPluginManager issue #80 for bandwidth needs requiring the ad), Don Ho (the author of Notepad++) has decided to stop bundling the Plugin Manager. As of this mid-January post, he says he’s working on his own embedded plugin manager, but with no estimated ship date.

    For now, you can download the Plugin Manager from @bruderstein’s releases page and do a manual installation.

  • How to replace a value after a statement?

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    RathardR

    Thank you so much, you are a saviour

  • How to "Replace" in block mode

    Locked
    2
    1 Votes
    2 Posts
    2k Views
    Scott SumnerS

    @George-Atkins

    The short answer is, in general, you can’t do this. Without knowing more details of your scenario, perhaps the best that can be offered up is to cut your column block to a new editor tab, perform your replace operation there (on that entire doc), rectangular-select the new contents, and copy and paste back into the original doc.

    Of course, if you provide more detail, perhaps a regular-expression search-and-replace operation could be crafted to do what you need, or possibly the description would allow other solutions to be brought to light…

  • how to comment url with spaces?

    Locked
    1
    0 Votes
    1 Posts
    676 Views
    No one has replied
  • [META: FORUM Question] Thread disappeared

    Locked
    5
    0 Votes
    5 Posts
    1k Views
    PeterJonesP

    Thanks for the offer, @guy038 , but it’s probably not worth the effort (I didn’t have any earth-shatteringly helpful ideas in that Topic).

    It just rubbed me the wrong way that an OP can unilaterally delete an entire Topic, thereby deleting other people’s posts.

    Thinking about it more, I’d probably rather have the Topic Tools > Delete Topic feature disabled completely (for non-admin users), rather than the conditional “if older than T or if other posts than OP”, because it would probably be simpler and thus more likely to be possible. But as @dail said, moderator/admins don’t have the power to configure the forum, so it would probably have to be the owner to do it (if possible at all), and I don’t know whether @donho would spend his time tweaking forum settings anymore.

    Again, thanks for the input (and for letting me vent).

  • Notepad++ Portable Chocolatey package won't launch

    Locked
    2
    0 Votes
    2 Posts
    946 Views
    Dfinaut135D

    I have already fixed this issue.
    I coppied the files (config.xml, langs.xml, session.xml and stylers.xml) from the running Folder and added them to the installation prozess.
    With these four files in the programmfolder, np++ starts properly.

  • HIghlight Hardware-Addresses ("MAC")

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    guy038G

    Hello, @nobsware and All,

    Execute the Search > Mark... menu option

    Insert the regex (?i)(?:(?1):){5}([[:xdigit:]]{2}) in the Find what: zone

    UNtick the Bookmark line , if necessary

    Tick the Wrap around option

    Select the Regular expression search mode

    Click on the Mark All button

    To navigate between all these hardware addresses, use the two options :

    Search > Jump up > Find Style Ctrl+Shift+0

    Search > Jump down > Find Style Ctrl+0

    To suppress these Find highlighting, use the Search > Mark... menu option first, then click on the Clear all marks button

    Best Regards,

    guy038

  • Sorting by a key with offset and length

    Locked
    4
    0 Votes
    4 Posts
    2k Views
    guy038G

    Hello, @abhay-gokhale, and All,

    The is a safe way to sort with an offset, in Notepad++. The trick is to copy the key sort, in front of each line to be sorted ;-))

    Let’s start with that sample text ( A long line from the license.txt file, split in several lines )

    The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.

    I, simply, inserted a 5 digits number, surrounded by a space character, at column 11 of each line, giving the following text :

    The licens 37529 es for most software are designed to take away your freedom to share and change 12345 it. By contrast, the GNU General Public License is intended to guarantee 94113 your freedom to share and change free software--to make sure the software i 88060 s free for all its users. This General Public License applies to most of th 46931 e Free Software Foundation's software and to any other program whose authors co 88060 mmit to using it. (Some other Free Software Foundation software is covered by 88060 the GNU Library General Public License instead.) You can apply it to your pr 62473 ograms, too.

    That five digits number will be the expected key sort. Now, applying the regex S/R :

    SEARCH (?-s)^.{11}(.{5}).+

    REPLACE \1\x20\x20\x20$0

    you should get the text :

    37529 The licens 37529 es for most software are designed to take away your freedom to share 12345 and change 12345 it. By contrast, the GNU General Public License is intended to 94113 guarantee 94113 your freedom to share and change free software--to make sure the 88060 software i 88060 s free for all its users. This General Public License applies to 46931 most of th 46931 e Free Software Foundation's software and to any other program whose 88060 authors co 88060 mmit to using it. (Some other Free Software Foundation software is 88060 covered by 88060 the GNU Library General Public License instead.) You can apply it 62473 to your pr 62473 ograms, too.

    Then, after running the sort operation ( Edit > Line Operations > Sort Lines Lexicographically Ascending, you get :

    12345 and change 12345 it. By contrast, the GNU General Public License is intended to 37529 The licens 37529 es for most software are designed to take away your freedom to share 46931 most of th 46931 e Free Software Foundation's software and to any other program whose 62473 to your pr 62473 ograms, too. 88060 authors co 88060 mmit to using it. (Some other Free Software Foundation software is 88060 covered by 88060 the GNU Library General Public License instead.) You can apply it 88060 software i 88060 s free for all its users. This General Public License applies to 94113 guarantee 94113 your freedom to share and change free software--to make sure the

    Notice that, when the key sort is identical ( case of 88060 ), for several lines, the lines are, in addition, sorted, according to the entire line contents ! ( authors - covered - software )

    Finally, using this second simple regex S/R, below, we get rid of the temporary key sort, at column 1 :

    SEARCH (?-s)^.{5}\h+

    REPLACE Leave EMPTY

    and obtain our expected text :

    and change 12345 it. By contrast, the GNU General Public License is intended to The licens 37529 es for most software are designed to take away your freedom to share most of th 46931 e Free Software Foundation's software and to any other program whose to your pr 62473 ograms, too. authors co 88060 mmit to using it. (Some other Free Software Foundation software is covered by 88060 the GNU Library General Public License instead.) You can apply it software i 88060 s free for all its users. This General Public License applies to guarantee 94113 your freedom to share and change free software--to make sure the

    Et voilà !

    Best Regards,

    guy038

  • 1 Votes
    4 Posts
    3k Views
    guy038G

    Hello, @arpad-zsok, @scott-sumner and All,

    Noticing that Arpad’s text contains, only, one | character per row, I suppose that this simple regex S/R, below, would be enough !

    SEARCH [^"]+\|

    REPLACE Leave EMPTY

    But my solution isn’t the true goal of this post, indeed ! While running the Scott’s search regex, below :

    (?-i)^((?:".+?",){11}")[0-9.]+?\|(?=NEGATIVE|POSITIVE)

    against the text :

    "processingIdentifier","dateTime","header/instrumentName","patientIdentifier","lastName","birthdate","sex","location","specimenIdentifier","testIdentifier","dilution","testName","result/value","unit","abnormalFlags","resultStatus","operatorName","resultDateTime","result","simple/resultCode" "A","B","C","D","E","20180328171007","VIDASPC01","F838-843","F838-843","SPT","UP Salmonella","0.07|NEGATIVE","F","20180328115445", "A","B","C","D","E","20180328171008","VIDASPC01","F838-844","F838-844","SPT","UP Salmonella","0.25|POSITIVE","F","20180328115446", "A","B","C","D","E","20180328171007","VIDASPC01","F838-843","F838-843","SPT","UP Salmonella","0.07|NEGATIVE","F","20180328115445",

    I noticed that it took some time ( ~2s ), before finding the first expected zone :

    “A”,“B”,“C”,“D”,“E”,“20180328171007”,“VIDASPC01”,“F838-843”,“F838-843”,“SPT”,“UP Salmonella”,"0.07|

    And I tried to understand that behavior ! First, I realized that the matching delay was due to the headers line, which does not contain any | symbol. Thus, the problem could be simplified !

    In a new tab, let’s build an unique line, with 3 initial “headers” lines, joined together, surrounded with two simple sentences :

    This is a test "ProcessingIdentifier","dateTime","header/instrumentName","patientIdentifier","lastName","birthdate","sex","location","specimenIdentifier","testIdentifier","dilution","testName","result/value","unit","abnormalFlags","resultStatus","operatorName","resultDateTime","result","simple/resultCode","processingIdentifier","dateTime","header/instrumentName","patientIdentifier","lastName","birthdate","sex","location","specimenIdentifier","testIdentifier","dilution","testName","result/value","unit","abnormalFlags","resultStatus","operatorName","resultDateTime","result","simple/resultCode","ProcessingIdentifier","dateTime","header/instrumentName","patientIdentifier","lastName","birthdate","sex","location","specimenIdentifier","testIdentifier","dilution","testName","result/value","unit","abnormalFlags","resultStatus","operatorName","resultDateTime","result","simple/resultCode" This is a text

    and let"s consider the generic regex ^(?-is)(".+?",){N}"z, where the letter N is any number > 0.Of course, as this text does not contain any lowercase letter z, the regex engine always answers Find: Can’t find the text…". On my old laptop, I obtained, depending of the used regex, the following times, for unmatching :

    With regex ^(?-is)(".+?",){1}"z => Immediate answer

    With regex ^(?-is)(".+?",){2}"z => Immediate answer

    With regex ^(?-is)(".+?",){3}"z => 1s

    With regex ^(?-is)(".+?",){4}"z => 2s

    With regex ^(?-is)(".+?",){5}"z => 7s , with a wrong unique match ( all the file contents !)

    Why the time, for the regex engine, to realize, that there is NO match, becomes exponential ? Well, this comes from the regex part ".+?". Indeed, to understand the process, let’s use the regex ^(?-is)(".+?",){1}"z, which can, also, be written ^(?-is)".+?","z

    Actually, due to the lazy quantifier +?, this regex means : Find the smallest range of standard characters, between two " symbols, which is followed with the string ,"z !

    So, let’s add a z lowercase letter, at the beginning of the second column header, as below :

    "ProcessingIdentifier","zdateTime","header/instrumentName","patientIdentifier","lastName","birthdate",......

    The regex part ".+?" catches the string “ProcessingIdentifier” and the part ,"z matches the ,"z string

    Now, let’s add, instead, a z lowercase letter, at the beginning of the third column header, as below :

    "ProcessingIdentifier","dateTime","zheader/instrumentName","patientIdentifier","lastName","birthdate",......

    This time, the regex part ".+?" catches the string “ProcessingIdentifier”,“dateTime” and the part ,"z matches the ,"z string

    And so on…, till inserting a z character at beginning of the last header :

    "ProcessingIdentifier","dateTime","header/instrumentName",...................,"resultDateTime","result","zsimple/resultCode"

    This time, the regex part ".+?" catches the huge string “ProcessingIdentifier”,“dateTime”…“resultStatus”,“operatorName”,“resultDateTime”,“result” ( 855 chars ) and the part ,"z matches the ,"z string, before the last header of the text ( simple/resultCode )

    So , depending of the location of that z letter, the quantifier +? takes as many non-null characters as to meet the ,"z string ! This regex engine behavior can be considered as a foretracking operation ( by analogy to the backtracking one ! )

    Now, everyone can understand why, if no z letter exists in the text, the time to answer becomes exponential, when replacing the {1} quantifier with greater values and, even with the {5} quantifier, I, personally, got a catastrophic foretracking :-((

    Don’t forget that, for instance, the regex ^(?-is)(".+?",){11}"z can be rewritten :

    ^(?-is)".+?",".+?",".+?",".+?",".+?",".+?",".+?",".+?",".+?",".+?",".+?","z

    And, as any part ".+?" may concern any form "....", "....","....", "....","....","....",…, it’s not difficult to guess that, because of the multiple possible combinations, troubles are not very far :-((

    Two obvious solutions to that problem are to use the regexes ^(?-is)("[^,]+?",){11}"z or ^(?-is)("[^"]+?",){11}"z

    However, I, also, got an other strange solution : to use the regex ^(?-is)(".+?",){11}+"z, with the possessive quantifier {11}+. Indeed, when no z letter exists in the list of headers, the negative answer, of the regex engine, is immediate !

    At first sight, this {11}+ syntax seems quite weird, because the {11} quantifier cannot change and the backtracking/foretracking process does not seem to be involved with that quantifier ! But, actually, this means that the regex engine, will not try any combination, after a first unmatched search, in the regex part ".+?",".+?",".+?",".+?",".+?",".+?",".+?",".+?",".+?",".+?",".+?",

    And, if your add a z, at beginning of the 12th header ( “ztestName” ), you 'll get , with the regex ^(?-is)(".+?",){11}+"z, the only possible match :-))

    In conclusion, the initial Scott’s regex should be used, with one the three syntaxes, below :

    (?-i)^((?:"[^,]+?",){11}")[0-9.]+?\|(?=NEGATIVE|POSITIVE)

    (?-i)^((?:"[^"]+?",){11}")[0-9.]+?\|(?=NEGATIVE|POSITIVE)

    (?-i)^((?:".+?",){11}+")[0-9.]+?\|(?=NEGATIVE|POSITIVE)

    Cheers,

    guy038

  • UDL bug about 'Comment line style'

    Locked
    1
    0 Votes
    1 Posts
    641 Views
    No one has replied
  • Keep session when launching NPP but files don't exsit

    Locked
    1
    0 Votes
    1 Posts
    559 Views
    No one has replied
  • -1 Votes
    1 Posts
    583 Views
    No one has replied
  • Wanting to Format 2000000 Lines of Text

    14
    0 Votes
    14 Posts
    4k Views
    Mark AllenM

    Mate

    Thank you so so so Much for your help with this, I truly mean that, it worked perfectly, If its okay, I am going to distribute this way to the supplier of the product so we can use it to make better reports from this program!!!

    Truly Thank you heaps, and thanks for Explaination as well, I should be able to use this in the future to write up my own rules…

    Again thanks heaps!!!

    Mark

  • Macros not in either shortcuts.xml file.

    3
    0 Votes
    3 Posts
    3k Views
    Steve PohorskyS

    One of my mottos is “Computers are less frustrating when we face them together.” One of the best ways historically of figuring things out like this is to grab someone else and show them what you are doing, and get their opinion. Of course, this forum is supposed to serve the same function, but the forum only knows the few details you share.
    When I looked at my shortcuts.xml file, I closed Notepad++ and used the regular Notepad to look at the xml file. Please try this if you have not already done so.
    Otherwise, please be patient to do the standard things:

    Do a full restart of your computer. Upgrade to the newest version of Notepad++. Post again, giving the version of your OS.
    Steve
  • 0 Votes
    1 Posts
    973 Views
    No one has replied
  • Don't autocomplete on space!

    Locked
    1
    0 Votes
    1 Posts
    600 Views
    No one has replied
  • How to make colored font for .tpl file like .php or .html?

    Locked
    1
    0 Votes
    1 Posts
    759 Views
    No one has replied
  • Removing Spaces after aligning text in columns

    Locked
    1
    0 Votes
    1 Posts
    696 Views
    No one has replied