• 0 Votes
    10 Posts
    442 Views
    Götz M. RitterG

    @Ekopalypse Thank you so much! Stay healthy, :-).

  • 0 Votes
    5 Posts
    362 Views
    John SleeJ

    @guy038 Thank you so much, Guy. In order to achieve what I want, I adjusted the search regex slightly, so that the whole block, the label line (^@X[/d]+@ F./R) and date are all captured:

    (?-s)((^@X.+\R)(?:(?s:[^@]*?)(\d\d\x20\w\w\w\x20\d\d\d\d)\.(?s:.*?)|(?s:.*?)))(?=^@X|^==|\Z)

    Best Regards. Stay safe!
    John

  • FIND IN FILES, THEN REPLACE: need confirm before replacing checkbox

    3
    0 Votes
    3 Posts
    884 Views
    PeterJonesP

    Addendum:

    That said, the actual content of your post is obviously a feature request. As explained in this FAQ, you need to submit feature requests in the issues section of the official github repository.

    Requests made only in this forum (where you posted) will not be tracked, and have a virtually 0% chance of being implemented; requests made in the official issues section will be tracked, and at least make the developers aware of your requests (though it does not guarantee implementation).

    If you do make an official feature request as a result of this topic, please paste a link to that request as a reply here, so that future readers can find it. Thank you.

  • Searching for, marking and replace in one Line

    7
    0 Votes
    7 Posts
    369 Views
    Alan KilbornA

    @Ekopalypse said in Searching for, marking and replace in one Line:

    \Q…\E is much easier

    and it is even easier if the regex string is intended to be all literal after a certain point. Just use \Q at that point an no “closing” \E is needed!

    Example, find a minimal run of any characters followed by 3 literal *:

    .*?\Q***

  • Bookmarks must be manually removed

    2
    0 Votes
    2 Posts
    172 Views
    EkopalypseE

    @Alan-Kilborn

    I agree with you but it looks like this was done on purpose.

    When a line is deleted, its markers are combined, by an OR operation, with the markers of the next line

  • Solving the problem of: “Save as Administrator”

    2
    0 Votes
    2 Posts
    366 Views
    EkopalypseE

    @Olu-Abimbola said in Solving the problem of: “Save as Administrator”:

    How do I stop this request from interrupting my work?

    Depends, either make sure you have proper access to the files beforehand or run npp in admin mode. I would go for the first choice.

  • unable to open notepad++ after latest update

    1
    0 Votes
    1 Posts
    164 Views
    No one has replied
  • Building Notepad++ with Visual Studio 2015/2017

    21
    0 Votes
    21 Posts
    19k Views
    Alan KilbornA

    @Ekopalypse

    Ah, never knew that. Presume one could also use 19.10.25017.0 in this case.

  • Find a URL that is unique

    7
    0 Votes
    7 Posts
    1k Views
    Adam YikA

    @Alan-Kilborn
    It worked! Thanks! Also, in case if anyone reading this don’t know what this means:
    “make sure the last line of your file has a line-ending at its end”,
    that means you make a line break after the last character so that the last line is blank:
    345c7c0c-017d-4b46-b6f8-b7f4314dea3c-image.png

    I’ve also find that twitter also redirects to this:
    [https://twitter.com/i/js_inst?c_name=ui_metrics]

  • Conditional replacing

    3
    0 Votes
    3 Posts
    511 Views
    astrosofistaA

    Hi @William-Baldwin, @PeterJones

    This regex could do the job, but lacking of actual data, as @PeterJones noted, may make it fail. Take it as a proof of concept:

    1234567 bla bla bla bla bla PRM 1234567 bla bla bla bla bla SEL

    Search: (?-s)^(\d{7})(?s).*?(?:(PRM)|(SEL))
    Replace: (?2${1}89)(?3${1}00)

    Output:

    123456789 123456700

    Hope this helps.

  • Re: Update Error - Unsupported 16-Bit Application

    2
    0 Votes
    2 Posts
    216 Views
    EkopalypseE

    @Larry-D

    sounds like an incomplete download.

  • Setting the encoding character set by "User Defined Language"

    3
    0 Votes
    3 Posts
    647 Views
    PeterJonesP

    @Hubert-Sack,

    Is it possible to set “Encoding -> Character Set” to “OEM-US” within / by setting in an “User Defined Language”?

    No, the encoding is not stored in or controlled by the User Defined Language (UDL), or by any of the builtin languages, either.

    Remember, the “language”, whether UDL or builtin language, is really a syntax highlighter: even if there is a requirement for some language to only use a certain encoding, that would be a requirement separate from its syntax. Syntax has to do with the words, tokens, commands, data, etc; encoding has to do with the mapping between bytes inside the file and the textual characters they represent: syntax is at a “higher level of abstraction” than encoding.

    so switching the encoding by a setting in “User Defined Language” is wanted

    The syntax parsing system itself (builtin or UDL) is encoding agnostic (cannot know about the encoding), because by the time the syntax parser is running, the bytes from the file have already been read and interpreted as characters by Notepad++ – and thus, it’s beyond the encoding stage. They work with characters, not with file-bytes.

    That said, you can automate many things in Notepad++ using plugins. For example, the PythonScript plugin allows you to run Python code which will affect the text and GUI. In this case, you could setup a PythonScript hook that runs during the File > Save event; this code could check to see if the file being saved is a UDL, and if it is then check if it’s your particular UDL, and if it is then it can change the encoding of the file to OEM-US.

    Once you install the PythonScript plugin, there are good help files included (Plugins > Python Script > Context-Help) which describe the various commands necessary; since you’re programming PLC, I am going to assume you know something about programming, and thus the simple Python syntax necessary shouldn’t be too difficult for you. If you need help on the Notepad+±related specifics, feel free to reply. But to get you started, look up the sections on “Handling Notifications” for a general overview, notepad.callback() for how to register the callback, “Enums > NOTIFICATION”, notepad.setEncoding() for changing the encoding, and notepad.getLangType()/.getLanguageName()/.getLanguageDesc() for identifying whether your UDL is active.

  • open selected file in default application

    24
    0 Votes
    24 Posts
    8k Views
  • Last opened files not opening

    7
    0 Votes
    7 Posts
    3k Views
    Nelson ChanN

    @PeterJones I checked the flag and it was already on so i clicked it off and back on and restarted NP++ and lo and behold it’s back to normal now!
    Thanks for your help.

  • Comments don't work?

    19
    0 Votes
    19 Posts
    22k Views
    Alan KilbornA

    @Dennis-Paroutsas

    It does work, but it isn’t (and can’t be) language aware.
    Thus if you always program in C-style languages you are all set.
    But if you code in several different languages you’d have to have different macros and different keycombos that invoke them.

    And, you have to highlight a line (or a block) before running the macro. It’s arguably easier to just press / and / and achieve the same thing, with no follow-on caret positioning needed.

  • Cost of Notepad++

    2
    0 Votes
    2 Posts
    163 Views
    Alan KilbornA

    @Kwabena-Asare

    Notepad++ is “donationware”. You may use it free of cost, but if you feel like it, you may make a donation by CLICKING HERE.

  • Merging or Joining every 7 lines in a text file using notepad++

    3
    0 Votes
    3 Posts
    321 Views
    guy038G

    Hello, @robert-baker, @alan-kilborn, and All,

    An other solution could be :

    SEARCH (?-i)\R+(?!EMAIL|\z)

    REPLACE \x20

    This alternate solution does not mind if additional line-break separates each section ;-))

    For instance, the input text :

    EMAIL: swmorton50@gmail.com CALLSIGN: AA4TI NAME: STEPHEN MORTON ADDRESS: 5644 CANTUCCI STREET ADDRESS-CITY: NOKOMIS ADDRESS-STATE-PROVINCE: FL ADDRESS-POSTALCODE: 34275 EMAIL: robertumpleby@tx.rr.com CALLSIGN: AA5AH NAME: ROBERT UMPLEBY ADDRESS: 1209 N WATERVIEW DR ADDRESS-CITY: RICHARDSON ADDRESS-STATE-PROVINCE: TX/DALLAS ADDRESS-POSTALCODE: 75080 EMAIL: aa5au@bellsouth.net CALLSIGN: AA5AU NAME: DON HILL ADDRESS: 2121 SUTHERLAND PLACE ADDRESS-CITY: HARVEY ADDRESS-STATE-PROVINCE: LA ADDRESS-POSTALCODE: 70058 EMAIL: rickmaxey51@yahoo.com CALLSIGN: AA5TL NAME: RICHARD MAXEY, JR. ADDRESS: 19708 MAHOGANY ST ADDRESS-CITY: BEND ADDRESS-STATE-PROVINCE: OR ADDRESS-POSTALCODE: 97702 EMAIL: AA1SU@arrl.net CALLSIGN: AA1SU NAME: PAUL N. GAYET ADDRESS: 11 CHERRY STREET ADDRESS-CITY: ESSEX JUNCTION ADDRESS-STATE-PROVINCE: VT ADDRESS-POSTALCODE: 05452 EMAIL: skeeter_1@yahoo.com CALLSIGN: AA3C NAME: RICHARD PETERS ADDRESS: 945 BEECHWOOD DR. ADDRESS-CITY: MURPHY ADDRESS-STATE-PROVINCE: TX ADDRESS-POSTALCODE: 75094

    would output :

    EMAIL: swmorton50@gmail.com CALLSIGN: AA4TI NAME: STEPHEN MORTON ADDRESS: 5644 CANTUCCI STREET ADDRESS-CITY: NOKOMIS ADDRESS-STATE-PROVINCE: FL ADDRESS-POSTALCODE: 34275 EMAIL: robertumpleby@tx.rr.com CALLSIGN: AA5AH NAME: ROBERT UMPLEBY ADDRESS: 1209 N WATERVIEW DR ADDRESS-CITY: RICHARDSON ADDRESS-STATE-PROVINCE: TX/DALLAS ADDRESS-POSTALCODE: 75080 EMAIL: aa5au@bellsouth.net CALLSIGN: AA5AU NAME: DON HILL ADDRESS: 2121 SUTHERLAND PLACE ADDRESS-CITY: HARVEY ADDRESS-STATE-PROVINCE: LA ADDRESS-POSTALCODE: 70058 EMAIL: rickmaxey51@yahoo.com CALLSIGN: AA5TL NAME: RICHARD MAXEY, JR. ADDRESS: 19708 MAHOGANY ST ADDRESS-CITY: BEND ADDRESS-STATE-PROVINCE: OR ADDRESS-POSTALCODE: 97702 EMAIL: AA1SU@arrl.net CALLSIGN: AA1SU NAME: PAUL N. GAYET ADDRESS: 11 CHERRY STREET ADDRESS-CITY: ESSEX JUNCTION ADDRESS-STATE-PROVINCE: VT ADDRESS-POSTALCODE: 05452 EMAIL: skeeter_1@yahoo.com CALLSIGN: AA3C NAME: RICHARD PETERS ADDRESS: 945 BEECHWOOD DR. ADDRESS-CITY: MURPHY ADDRESS-STATE-PROVINCE: TX ADDRESS-POSTALCODE: 75094

    Best Regards,

    guy038

  • 0 Votes
    5 Posts
    2k Views
    Michael TaylorM

    Found this that explains it:
    http://www.thealarmtech.com/forum/viewtopic.php?f=33&t=107

    Really helps for visualization.

  • Help with the Gmod lua lexer plugin

    1
    0 Votes
    1 Posts
    190 Views
    No one has replied
  • Answer: [Solved]

    2
    0 Votes
    2 Posts
    308 Views
    Alan KilbornA

    @Sid-Jetty

    Wasn’t that already answered in the linked-to thread?
    If you were going to contribute something related, why didn’t you do it in that other thread?
    Your answer really doesn’t add any new information.