• RegEx selective replace

    3
    0 Votes
    3 Posts
    228 Views
    Forum BlokeF

    @PeterJones said in RegEx selective replace:

    (?-s)(DRAW.*)Thirty

    Many thanks!

  • How do I add text to each line?

    6
    0 Votes
    6 Posts
    363 Views
    guy038G

    Hi, @melad-eissa,

    In my previous post, I give an example of the modifications needed :

    INITIAL : sissleib6930 @ stu.howardcollege.edu : Not-Engaged EXPECTED : sissleib6930 @ stu.howardcollege.edu : Not-Engaged :Email. stu.howardcollege.edu

    Seemingly, we need the part between the @ and the : chars because this part has to be re- written at the end of line, too

    However, the part before the @ char does not change at all. So we can represent the goal as below ( note that Space chars are irrelevant )

    The OVERALL match = $0 /¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\ INITIAL Text @ stu.howardcollege.edu : Not-Engaged EXPECTED Text @ stu.howardcollege.edu : Not-Engaged :Email. stu.howardcollege.edu \___________________/ \_____/ \___________________/ Group 1 String Repeated Group 1 SEARCH regex @ ( .+ ) : .+ REPLACEMENT regex $0 :Email. \1

    Now, the exact syntax of this regex S/R is rather obvious :

    SEARCH (?-s)@(.+):.+

    REPLACE $0:Email.\1

    And will change the initial text :

    ernestobaltar@yahoo.com:Golden-Ball amaury.tenaille@epfedu.fr:SilverBall Inspirit@staplesnet.us:Copper_Ball Matthewsk@mail.montclair.edu:Encourage sissleib6930@stu.howardcollege.edu:Not-Engaged

    into the expected text :

    ernestobaltar@yahoo.com:Golden-Ball:Email.yahoo.com amaury.tenaille@epfedu.fr:SilverBall:Email.epfedu.fr Inspirit@staplesnet.us:Copper_Ball:Email.staplesnet.us Matthewsk@mail.montclair.edu:Encourage:Email.mail.montclair.edu sissleib6930@stu.howardcollege.edu:Not-Engaged:Email.stu.howardcollege.edu

    Notes :

    In the search regex :

    First, the (?-s) ensures that any regex symbol . will match a single standard character, only and not EOL chars

    Then the part @(.+): searches for the @ character followed with a non-null range of chars till a colon :. Note that this range is stored as group 1 because of the parentheses

    The final part .+ represents the characters after the colon char of each line

    In the replacement regex :

    We first insert the overall pattern $0. So, everything between the @ char and the end of current line

    Then, we write the literal string :Email.

    -Finally, we re- write the contents of Group 1, so the name of each site, thanks to the \1 syntax

    Best Regards,

    guy038

  • Bullet point and Multi-Asterisk not working as delimiters

    7
    0 Votes
    7 Posts
    510 Views
    phenomenal11P

    @PeterJones
    Well i raised a request on github page. I hope it gets some interest from the dev.

  • Customize search result format

    2
    0 Votes
    2 Posts
    130 Views
    EkopalypseE

    @Easter-Solve

    Can I customizing the format result of the “Search”?

    As a configuration option? Nope.

    But what exactly want you to change maybe there is a workaround for that?

  • Setup to run unitTestLauncher.ps1

    6
    1 Votes
    6 Posts
    248 Views
    el-coder-sbE

    @Ekopalypse Thanks for your help and motivating me to go some steps further!

    I got it:

    I changed my setup to:

    C:\notepad-plus-plus-master <- where I copied the current Notepad++ clone
    C:\npp_7_8_8_bin_x64 <- where the latest realese was unzipped

    This makes it possible to put the path in unitTestLauncher.ps1 without quotation marks (your proposal did not work as this was what caused the “unexpected token”-error), as there is no space in the path (due to Windows “Program Files” -> bad Microsoft!).

    Now my first line in unitTestLauncher.ps1 is:

    C:\npp_7_8_8_bin_x64\notepad++.exe -export=functionList -lasm .\asm\unitTest | Out-Null

    BTW: I get onlly 2x “OK” as the bash test fails. But that´s another story.

    Now I can go on with the VHDL unittest! Thanks for your help!

  • Replace A if B=C

    4
    0 Votes
    4 Posts
    171 Views
    JaevwynJ

    @guy038 said in Replace A if B=C:

    Hi, @jaevwyn and All,

    If I correctly understood you, you want that the value of the TillNumber attribute is changed by the number 91 ONLY IF the value of the StartDate attribute is prior to the date 2020-04-01

    If so, the following regex S/R should work :

    SEARCH \d+(?=</TillNumber>\R.+\R<StartDate>(19\d\d|20[01]\d|2020\-0[123]))

    REPLACE 91

    Of course, select the Regular expression search mode and, may be, the Wrap around option

    Best Regards,

    guy038

    Perfect, thanks!

  • Automatic text transform with incremental numbering

    6
    0 Votes
    6 Posts
    287 Views
    Maxim AbrossimowM

    @WinterSilence Thank you, too for your input! I tried with RegEx, but it is just so much easier with Python…

  • RegEx domain extraction

    3
    0 Votes
    3 Posts
    663 Views
    Stefan RalicS

    @guy038 this did the trick :) Thank you so much… I tried that already but now i see i was missing ) so no wonder it didn’t work. Thanks again. Best regards

  • NPP 7.8.5 breaks CustomizeToolbar plugin

    3
    0 Votes
    3 Posts
    328 Views
    ygoe____Y

    Okay, the breaking change in Notepad++ 7.8.5 was the menu structure. In the menu “Ansicht” (View), the submenu “Nicht druckbare Zeichen” (Non-printable characters) has been renamed to “Symbole anzeigen” (Show symbols). Since the custom toolbar button plugin only reads the menu titles (and doesn’t use persistent and language-invariant IDs like everybody else), it will break whenever something has been renamed there.

  • File already open in notepad++ Error

    2
    0 Votes
    2 Posts
    135 Views
    Alan KilbornA

    @Glogernater

    This sounds similar to THIS.

  • Extract the lines greater than

    6
    0 Votes
    6 Posts
    2k Views
    Alan KilbornA

    @guy038 said in Extract the lines greater than:

    And I thought that the OP wanted to select the entire lines with last number greater than 14.

    Yes, you thought that because that’s what the OP said. :-)

    May be, the OP just wants to delete lines with last number under 15 !

    I don’t know about that.
    I’ve already queried the OP on what his end goal is.
    Probably best to wait for that answer, if it ever comes.

  • Problems with Notepad++ v7.8.7 windows management icons dissapear

    3
    0 Votes
    3 Posts
    188 Views
    1980Gandalf1

    @PeterJones Hello and thanks Peter.

    Notepad++ DebugInfo.jpg

    “You uninstalled it, but have you rebooted to make sure that all remnants are gone?” Yes I did it because I don’t know why my computer stopped detecting some external hard drives connected through USB and tested in different ports so I finally rebooted.

    Sorry but I realized (I think it could happened the same earlier) that could be a framwework windows border color problem (not windows or notepad++). I changed windows border framework because with dark mode I wasn’t able to see anything when I was managing windows border so I read a article how to geek in how to change it and now, I think that in the first image I can’t see the whole notepad++ window border because program is really top located and blue border is mixed with other program blue border
    Notepad-Problem.jpg

    But now it seems I can see notepad++ blue border mixed with other program blue border but I can see windows management icons
    01 Windows frameworks.jpg

    Sorry first for posting wrong images (this time I used upload image forum option) and secondly I think it could have been a visual effect and not a bug of windows or notepad++, anyway, I will keep checking it to see if I experience it again.

    Thanks a lot for your help @PeterJones

  • Searching two words on different lines

    4
    0 Votes
    4 Posts
    1k Views
    Alan KilbornA

    Like most of @Makwana-Prahlad 's posts, this one deeply confuses me.

    You need a new version of notepad++. Looks like old versions don’t support |.

    Misinformation, unless by “old” you mean pre-6.0.
    But why would you assume OP is using a really old version anyway – the OP didn’t say what version, but…

    egrep

    What does that have to do with anything??

    egrep “CAT|TOWN” will search for lines containing CATOWN.

    What does that have to do what the OP is needing to do?

    I could pick apart the rest of the posting, but it is getting tiring.
    Just please, don’t spread misinformation.

  • How to suceed these actions in notepad++ (images included)

    19
    0 Votes
    19 Posts
    567 Views
    DJSpirosGD

    @guy038 said in How to suceed these actions in notepad++ (images included):

    Thanks for searching on your own ! Your regex is OK if the second line begins with a digit but would not work if the first line would begin with a digit

    I’am trying to learn! Not successfully i guess :-P

    You are right i haven’t thought about the first line, i was focusing on artist because of my example. I don’t say that i could solve it though :-)

    By the way your script works flawlessly

  • Range Comand of Numbers in UDLdidn't work

    2
    0 Votes
    2 Posts
    352 Views
    guy038G

    Hello, @hans-gerch and All,

    The Range field ( Bereich ) is not intended to define the range of numbers

    It’s just a kind of suffix-prefix symbol(s) which will be highlighted, like the numbers placed right before and, possibly, the numbers located right after

    For instance, if that Range zone contains - :: __ ( a single dash, a double colon or a double underscore chars ), this means that, for instance, all the strings, below, will be highlighted in red

    2-0.5 100::47 0.003__7.785 0000::

    Now, I’m not very acquainted with UDL and I don’t see an obvious way to distinguish the digit 0 from the other digits ! I’m afraid that it cannot be do with the native N++ UDL feature.

    However, you could use an enhanced UDL lexer, which could manage, differently, the 0 digit from the others. Two conditions :

    Firstly, install the PythonScript plugin ( last version 1.5.4, using Python v2.7.18 )

    Secondly, use the EnhanceUDLLexer.py Python script, created by @ekopalypse, from that post :

    https://notepad-plus-plus.org/community/topic/17134/enhance-udl-lexer/31

    Best Regards,

    guy038

  • Sort case insensitive on 64 bit?

    17
    0 Votes
    17 Posts
    1k Views
    Alan KilbornA

    @Michael-Vincent @Terry-R

    Hey! Those don’t should like sh!tty names!
    They seem like backronyms to me though. :-)

  • Convert Clock Hours to Double Digits

    3
    0 Votes
    3 Posts
    172 Views
    Sean PerryS

    @guy038 said in Convert Clock Hours to Double Digits:

    \b\d:\d\d([[:punct:]]\d\d([[:punct:]]\d\d)?)?

    You are correct, that did the trick and saved me a lot of time. Thank you!

  • 0 Votes
    2 Posts
    124 Views
    Alan KilbornA

    @Võ-Văn-Hiếu

    I guess because a developer forgot to add it? :-)

    If you want to get it added, you can make a request by following the instructions provided HERE.

    As a workaround, you could record the operation into a macro, and then bind your desired keycombo to that macro.

  • Notepad++ 7.8.7 freeze/whiteout on start

    5
    0 Votes
    5 Posts
    4k Views
    Alan KilbornA

    @brkerez

    Nice analysis!
    It’s a good reminder for everyone in an odd situation: The first thing you should try is disabling all plugins and see what that does for you.

  • Proxy settings

    2
    0 Votes
    2 Posts
    2k Views
    HR HufnStufH

    @HR-HufnStuf

    The answer to this was actually simple. When I connected to our guest network or my personal network at home it worked.