• Help needed urgently.

    8
    0 Votes
    8 Posts
    1k Views
    guy038G

    Hello, @somethingmad, @peterjones and All,

    @somethingMad, here is an other alternative to the @peterjones’s solution. So, given this INPUT text :

    lori.figaro@gmail.com|5.69272238158E11|4547490.0|#11811391_PRP|LORI|FIGARO|75.85|0.0|75.85|0.00|75.85|2622 AVALON FOREST CT||SPRING|Shipping|United States|US|LORI|FIGARO|LORI FIGARO|7132049425|Texas|TX|77386-2972|30.14205889999999|-95.40070209999999||2018-09-15 19:15:52.000|1537064180000|2018-09-01 stcstout@ruraltel.net|5.6932954939E11|4547618.0|#11811461|Tyna| Stoutimore |31.9|0.0|31.9|0.00|39.85|11 SW 2ND ST||PHILLIPSBURG|Shipping|United States|US|Tyna| Stoutimore |Tyna Stoutimore |7855432781|Kansas|KS|67661-2609|39.7476562|-99.32758539999999||2018-09-15 22:53:47.000|1537077256000|2018-09-01 annijchaz@msn.com|5.69279643726E11|4547508.0|#11811400_PRP|Annette|Chavez|128.65|0.0|128.65|0.00|163.65|5812 TRAIL CT NW||ALBUQUERQUE|Shipping|United States|US|Annette|Chavez|Annette Chavez|5053071755|New Mexico|NM|87107|35.1414399|-106.6457214||2018-09-15 19:40:47.000|1537065705000|2018-09-01

    with the regex S/R below :

    (?xi) ^ # SEARCH regex in 31 lines ( [\w.@]* ) \| # Field 01 ( [\dE.]* ) \| # Field 02 ( [\d.]* ) \| # Field 03 ( \# \w* ) \| # Field 04 ( [\w ]* ) \| # Field 05 ( [\w ]* ) \| # Field 06 ( [\d.]* ) \| # Field 07 ( [\d.]* ) \| # Field 08 ( [\d.]* ) \| # Field 09 ( [\d.]* ) \| # Field 10 ( [\d.]* ) \| # Field 11 ( [\w ]* ) \| # Field 12 ( [\w.: -]* ) \| # Field 13 EMPTY ( \w* ) \| # Field 14 ( \w* ) \| # Field 15 ( [\w ]* ) \| # Field 16 ( \w* ) \| # Field 17 ( [\w ]* ) \| # Field 18 ( [\w ]* ) \| # Field 19 ( [\w ]* ) \| # Field 20 ( \d* ) \| # Field 21 ( [\w ]* ) \| # Field 22 ( \w* ) \| # Field 23 ( [\d-]* ) \| # Field 24 ( [\d.]* ) \| # Field 25 ( [\d.-]* ) \| # Field 26 ( [\w.: -]* ) \| # Field 27 EMPTY ( [\d.: -]* ) \| # Field 28 ( \d+ ) \| # Field 29 ( [\d-]* ) $ # Field 30

    REPLACE $1|$5|$6|$12|$14|$16|$21|$23|$29

    We get this OUTPUT text :

    lori.figaro@gmail.com|LORI|FIGARO|2622 AVALON FOREST CT|SPRING|United States|7132049425|TX|1537064180000 stcstout@ruraltel.net|Tyna| Stoutimore |11 SW 2ND ST|PHILLIPSBURG|United States|7855432781|KS|1537077256000 annijchaz@msn.com|Annette|Chavez|5812 TRAIL CT NW|ALBUQUERQUE|United States|5053071755|NM|1537065705000

    Practically :

    Close the Find/Replace/Mark dialog if already opened

    Select all the search regex, between (?x) and Field 30 included

    Open the Replace dialog ( Ctrl + H )

    => The Find what : zone is immediately populated

    Select all the replacement regex and paste it in the Replace with : zone

    Uncheck all box options

    Check the Wrap around option

    Select the Regular expression search mode

    Click once on the Replace All button

    Of course, as I’m French, just verify if the appropriate columns are written after the global replacement !! Anyway, it shouldn’t be difficult to select the right columns, with the given search regex ;-)

    Best Regards,

    guy038

  • Is there any way to convert code points to unicode

    14
    0 Votes
    14 Posts
    2k Views
    Alan KilbornA

    @dinkumoil said:

    You could create an HTML file that includes your code points as HTML entity numbers

    …and…

    @rdipardo said:

    you can encode the text as numeric entities, then convert them right in Notepad++ with the HTML Tag plugin

    …and that’s all fine, but the OP ( @User-000 ) had a title on this posting of “Is there any way to convert code points to unicode”, so I found it curious that no example was provided that actually had some fun and uses any “fancy” unicode characters. (Of course, OP didn’t do this in his sample data, either…).

    I didn’t try with the HTML Tag plugin, but I did try the “HTML file” approach with some “fancy” character data:

    <body> <p> &#72&#101&#108&#108&#111&#32&#87&#111&#114&#108&#100&#33&#x25BC&#x1F499 </p> </body>

    and indeed it worked just fine to show the fancy-ness for characters U+25BC and U+1F499; here shown in Chrome:

    547dfa37-ee07-4847-ada1-da6b98332cd1-image.png

  • Search and extract results between two strings in multiple files

    6
    0 Votes
    6 Posts
    3k Views
    Amit PandeyA

    Hello @guy038 ,

    My bad, i misinterpreted your reply and went into a different direction.
    (also had to upgrade my NPP (upgraded to v8.4.9) to reflect ‘Copy Marked text’ option".

    I have now achieved what is required.

    Here are the steps which i followed

    Search for Regex String ‘PROCEDURE INIT-RECORD|ASSIGN|END PROCEDURE’ across the files Copied the search result in a new window Applied regex search string provided by you in the earlier reply’ and followed the provided steps All the target keywords within the target procedure were marked Used ‘Copy Marked Text’ option and got my results

    Thanks a lot for your help.

  • Notepad++ Hides code elements

    7
    0 Votes
    7 Posts
    1k Views
    EffiosoE

    @Ekopalypse Thanks!

    Ehm… today… everything is fine again. WTF? Maybe all I had to do was a reboot…

  • NppTextViz plugin no longer working

    3
    0 Votes
    3 Posts
    1k Views
    JaZnam ForeJ

    NppTextViz seems to be abandoned by its owner, but someone posted the commits containing the fix here (it works with newest Notepad++ as of now):

    https://github.com/KubaDee/NppTextViz/pull/5/commits

    The compiled x86 and x64 binaries containing the fix are avaiable here:

    https://mega.nz/folder/cVcRWQSQ#7CGqNYXWrPyoX0dh-G_Uog

    Check them with VirusTotal prior to copying to Notepad++ plugin dir if you have any doubts.

    If posting such URLs is breaking any community rules, please tell me where else I can upload the files.

    Have a good one!

  • adding the FileName into the file itself.

    8
    0 Votes
    8 Posts
    4k Views
    Alan KilbornA

    Peter provided a macro, but looking at it, you can’t easily tell what it does (of course, Peter describes it, but what if he didn’t?).

    I’ve been working on a macro “disassembler” that will help to reverse-engineer a provided macro, or even let you just recall what your own macros actually do.

    Here’s what my in-progress tool produces for Peter’s macro:

    <Macro name="Replace First Line with Filename" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="0" message="2316" wParam="0" lParam="0" sParam="" /> SCI_DOCUMENTSTART <Action type="0" message="2338" wParam="0" lParam="0" sParam="" /> SCI_LINEDELETE <Action type="2" message="0" wParam="42030" lParam="0" sParam="" /> IDM_EDIT_FILENAMETOCLIP <Action type="0" message="2179" wParam="0" lParam="0" sParam="" /> SCI_PASTE <Action type="1" message="2170" wParam="0" lParam="0" sParam="\r" /> SCI_REPLACESEL <Action type="1" message="2170" wParam="0" lParam="0" sParam="\n" /> SCI_REPLACESEL <Action type="2" message="0" wParam="41006" lParam="0" sParam="" /> IDM_FILE_SAVE <Action type="2" message="0" wParam="41003" lParam="0" sParam="" /> IDM_FILE_CLOSE

    It does require a bit of N++ “smarts” to know what things like SCI_REPLACESEL and IDM_EDIT_FILENAMETOCLIP mean, but it isn’t a real stretch of the imagination that even noobs could figure it out.

  • UDL for tag language

    2
    0 Votes
    2 Posts
    252 Views
    PeterJonesP

    @castortech ,

    eeab7ad1-ff61-46fc-bb80-5750ec5297e6-image.png

    91981cf2-f436-4e47-a3ca-c2e42f2ea63b-image.png

    If that comes close to what you want, then you can use

    Keywords 1 = [fusion_ and [/fusion_ in prefix mode – this means that the highlighting will continue after the fusion_ through the last non-whitespace encountered in that “word” Keywords 2 = type sticky in prefix mode: without prefix mode, the = being immediately after the keyword means the keyword is not recognized. Alternately, you could turn off prefix mode, and instead include the = as part of the keyword. Here is an example of Keyword 3 = filter_sepia= filter_sepia_hover=, with peach-on-yellow coloring, with prefix mode not checkmarked:
    ba19da25-8582-4a15-af48-f60ba557a333-image.png Operators & Delimiters > Delimiter 1: Open = " and Close = " with styler = bright blue to highlight the quoted attribute values.

    Hopefully, this gets you started in the right direction.

  • 0 Votes
    7 Posts
    496 Views
    CoisesC

    @Mark-Olson said in Amazon review date regular expression doesn’t work e.g. December 23, 2021 /([A-Z][a-z]+) \d{1,2}, \d{4}/:

    Eh, I wouldn’t worry too much about the fact that ChatGPT can generate a regex that matches that specification, since generate a regex that matches a date in such-and-such a format has probably appeared a lot of times in its training data.

    A very dear friend of mine would frequently shout in frustration, “Why don’t you just answer the question?!” after doing a Google search. Despite being very intelligent and reasonably computer-savvy, she could not seem to escape the illusion that the search was responding to what she asked and not just matching words. So I suppose we shouldn’t be surprised that people using ChatGPT can’t keep in mind that it literally does not know what it is talking about. At best, it’s as accurate as the average source in its training data, which… should give us all pause…

  • User Defined Language for GCode Help

    3
    0 Votes
    3 Posts
    505 Views
    Lycan ThropeL

    @James-Richters ,
    I’m not sure what the problem is that you’re having as I just created a UDL using your code, a sample file from the one you provided, and it seems to be working fine for me without that multicolored Power keyword. There is one with it and I can’t find in your definition for the UDL where those singular or grouped letters would do that goofy multi color stuff. Here’s a screen shot of what I have after I typed in the Power Off keyword set:

    ProAuto.PNG

    @Mark-Olson is right though, that any other coloring changes that would need to have a Regex needed such as your need for a if/or condition should be done using the EnhanceAnyLexer plugin.

  • New install/user - npp won't open some files

    4
    0 Votes
    4 Posts
    2k Views
    Terry RT

    @Thomas-Shelby
    You are possibly asking someone who hasn’t been on the forum for a long time, and the post is really old as well.

    Why don’t you just explain the issue you are having and maybe a current forum member can help you?

    We’d need to know the file type (normally the file extension) as that can have a bearing on the issue. Also where it’s located. Consider copying that file to a folder close to the root (something like C:\temp folder) and see if it opens.

    What happens when you try to open the file?

    Terry

  • Unable to load Auto Complete file

    4
    0 Votes
    4 Posts
    3k Views
    Goten SanG

    @tomas-chrastina said in Unable to load Auto Complete file:

    Hi,

    finally I downloaded files. I checked file using XML Tools, and found errors. So you need to correct them.

    First you should use escaped characters for attribute values of generated XML file (it will solve most of errors I can see):
    < -> <
    > -> >
    & -> &
    " -> "

    To change this lines containing special characters like:

    <Param name="&flags"/> <Overload retVal=">" ...

    I don’t know python, but it should be easy to implement escaping for you I guess -> Escaping XML.

    Then simply use XML Tools to check file, until it will be correct.

    Hint: You can use for new line in descr attribute. It will made file easier to read.

    descr="1st Line

    2nd Line"

    --- Best regards, Tomas.

    Thanks.

  • Re-open last tab closed

    6
    0 Votes
    6 Posts
    48k Views
    Thomas ShelbyT

    @Aircheck-Indiateam said in Re-open last tab closed:

    alt space x

    Thanks.

  • Updater doesn't work, need proxy address?

    1
    0 Votes
    1 Posts
    793 Views
    No one has replied
  • Make Notepad++ default editor for browser?

    2
    0 Votes
    2 Posts
    237 Views
    Lycan ThropeL

    @Ronald-Dupas ,
    You haven’t defined your chosen browser that you want to use, so minus that information, very little factual help can be provided. However, if you are wanting to use the Firefox Browser, the below pic will show you want you’re looking for there, by clicking Settings->Applications and choose the file type you want opened by default by the Notepad++ application, click the right menu selection, and then select Use other... and browse to your chosen application.

    BrowserDefaultTextEditor.PNG

  • Greek capital letter 'Α punctuated does not appear correctly

    7
    0 Votes
    7 Posts
    6k Views
    Goten SanG

    @cchalkiopoulos said in Greek capital letter 'Α punctuated does not appear correctly:

    That is a very detailed answer. For sure you have covered all angles of this issue.

    Your 2 suggestions make sense to me and I have actually tried the 1st one and it works fine for me to change the encoding to Greek/Windows-1253.

    From my side it is totally fine to mark this thread as being resolved.
    I’m however very curious to the fact that you do not consider this as a bug on Notepad++.
    I will try to phrase this as follows: “A certain file is displayed correctly with Notepad but with Notepadd++”. Isn’t this fixable?

    Many thanks for your time.
    Honest regards,
    Christos C.

    Thanks.

  • Updating removed all my recent files?

    2
    0 Votes
    2 Posts
    249 Views
    Terry RT

    @Duck said in Updating removed all my recent files?:

    Is this intended, and is there any way to restore said files?

    No it is NOT intended, however with any system there can be issues.

    Unfortunately you have fallen victim to using the default backup system without understanding how it actually operates. Many have suffered the same issue as you and in almost every case all we can recommend you do is read the FAQ post Periodic Backup vs AutoSave Plugin. In there is information on where any possible backup files might be.

    If you are really lucky it will just be that the session.xml file which has been cleared. If so then the backup files will likely still exist. Read that post, it will explain it all.

    Please also heed the recommendations made there. If you learn anything at all (even if your critical files are lost) it is that you need to set what type of backup system you will use in future and understand the processes going on.

    Terry

  • Remove everything but specific chains

    7
    0 Votes
    7 Posts
    1k Views
    guy038G

    Hello, @david-l,

    But, regarding the two last cases :

    amounts 1234 and 4567 amount A1A1

    do they need to be followed with a space or dot character as well ?

    Remember: regular expressions are a school of precision ! Each character and its position has its importance !

    Best Regards,

    guy038

  • Notepad has hyjacked Windows Notepad

    4
    0 Votes
    4 Posts
    1k Views
    Lycan ThropeL

    @_ ,
    Amazing. The man answers your question in a straight forward and informative manner, and you read ''annoyed" in it? Wow, you’ve shown super powers of wokeness. Moving on. Downgrading post.
    And yes, that was a conveyed “annoyed” response on my part.

  • Change the color of the previous line

    3
    0 Votes
    3 Posts
    267 Views
    HaichitoH

    @PeterJones Okey, I will try to implement what you said.
    Thank you very much.

  • Help with Regex

    4
    0 Votes
    4 Posts
    322 Views
    PangolinP

    Thank you very much Mark and Guy for taking the time to answer my request. It is really appreciated!

    Have a nice evening