• 1 Votes
    5 Posts
    1k Views
    Norbert QuastN

    @Scott-Sumner said:

    Favorites.dat is used by the Explorer plugin…and Claudia’s proposed technique should work just fine for it as well.

    Thank

  • Ctrl + Backspace

    Locked
    6
    0 Votes
    6 Posts
    3k Views
    Claudia FrankC

    @Gaurav99

    by any chance to you mind uploading the erroneous config.xml to some place
    where I can download it? I’m just curious what could have caused this.

    Cheers
    Claudia

  • Always opens As Administrator

    Locked
    2
    0 Votes
    2 Posts
    7k Views
    Claudia FrankC

    @Curtis-Krajca

    wasn’t there such option if you right-cklick on npp shortcut and open settings/properties or so?
    If not, delete the shortcut and create a new one.

    Cheers
    Claudia

  • Is it possible to disable the "Delete from Disk" option from Menu "File".

    Locked
    2
    1 Votes
    2 Posts
    970 Views
    Claudia FrankC

    @Veera-Kotnala

    not really but newer version will move it to recycle bin.

    Cheers
    Claudia

  • Remove duplicate strings with comma separator

    Locked
    4
    0 Votes
    4 Posts
    2k Views
    Saki SoulimenasS

    OK, Problem solved… i needed to wake up first. :)
    I’ll use your comma replacer first and then i can remove duplicate lines.

    Perfect! Thank you very much.
    Have a nice day

  • Mobile\Cloud Usage

    Locked
    2
    0 Votes
    2 Posts
    911 Views
    Claudia FrankC

    @Carl-Fuess

    I assume you are looking for File->SaveSession and File->LoadSession.

    Cheers
    Claudia

  • Marking lines immediatelly after marked lines

    Locked
    3
    0 Votes
    3 Posts
    5k Views
    Mortaza AziziM

    Hello @guy038
    Thanks for your comprehensive reply to my question.

  • UDL for .properties files.

    Locked
    2
    0 Votes
    2 Posts
    940 Views
    Jim DaileyJ

    @Baneeishaque
    Try the Language–>Define your language … menu entry.

  • How can i paste something on lines without making new ones?

    Locked
    1
    0 Votes
    1 Posts
    707 Views
    No one has replied
  • [Regex] Remove all but last line

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    Bobby Peters222B

    Thanks guy038 your second one worked perfectly for me. Really appreciate it.

  • Setting a Column to a fixed value in a text file

    4
    0 Votes
    4 Posts
    3k Views
    guy038G

    Hello @chuck-ballinger,

    An other possibility is to use regular expressions !

    Let’s suppose that you want to insert a X character, in column n, on any line of your file :

    Open the Replace dialog ( Ctrl + H )

    OPTIONS Wrap around and Regular expression checked

    SEARCH (?-s)^.{n-1}\K\x20+(?=(X))|^.{0,n-1}\K ( Replace the expression n-1 with the appropriate number ! )

    REPLACE ?1:n spacesX

    ACTION click TWICE on the Replace All button

    So, assuming the initial text, below, with a first blank line :

    1 12 123 1234 12345 123456 1234567 12345678 123456789 1234567890 12345678901 123456789012 1234567890123 12345678901234 123456789012345

    After two click on Replace All, we get the text :

    X 1 X 12 X 123 X 1234 X 12345 X 123456 X 1234567 X 12345678 X 123456789X 123456789X0 123456789X01 123456789X012 123456789X0123 123456789X01234 123456789X012345

    If you like that solution, I’ll give you, next time, some details on that regex S/R !

    Best Regards,

    guy038

  • Regex: Remove particular words from tags in several text pages

    12
    0 Votes
    12 Posts
    6k Views
    guy038G

    Hello, @vasile-Caraus and All,

    The general syntax of your regex is :

    SEARCH (?-s)(\G|BR)((?!ER).)*?\KSR

    REPLACE RR

    where :

    BR ( Begining Regex ) is the regex which defines the start of the defined zone, for search/replacement

    ER ( Ending Regex ) is the regex which defines the end of the defined zone, for search/replacement

    SR ( Search Regex ) is the regex which defines the regex to search, in any defined zone

    RR ( Replace Regex ) is the regex which defines the regex replacing the search regex, in any defined zone

    For instance, before the S/R, if we have :

    ..SR.....SR...BR......SR............SR.....ER...SR......SR...BR.......SR........ER....BR..SR......SR.....SR...ER....SR......SR..

    it will give the results :

    ..SR.....SR...BR......RR............RR.....ER...SR......SR...BR.......RR........ER....BR..RR......RR.....RR...ER....SR......SR..

    Of course, in the Vasile’s example, we have :

    BR = <p class="my_class">

    ER = </p>

    SR = &nbsp;

    RR = \x20

    But, let’s suppose that we take :

    BR = [01234]+

    ER = [56789]+

    SR = (?i)[a-z]+

    RR = |$0|

    So, assuming the text :

    ..SR.......SR....BR....SR....SR.......ER...SR........SR.....BR....SR.....ER..BR....SR......SR.....SR......ER....SR......SR....... ..Here.....is....111...a.....Simple...6....Example...of.....44....some...9999000...TEXT....to.....Search..7.....and.....Modify...

    and the transformed regex S/R :

    SEARCH (?-s)(\G|[01234]+)((?![56789]+).)*?\K(?i)[a-z]+

    REPLACE |$0|

    it would produce, as expected, the text :

    ..SR.......SR....BR....RR......RR.........ER...SR........SR.....BR....RR.......ER..BR....RR........RR.......RR........ER....SR......SR....... ..Here.....is....111...|a|.....|Simple|...6....Example...of.....44....|some|...9999000...|TEXT|....|to|.....|Search|..7.....and.....Modify...

    Cheers,

    guy038

  • 0 Votes
    3 Posts
    1k Views
    Chip CooperC

    What you’re describing is very common in OOP languages. If this behaved like they do, one would be looking for something more like a doEvents operation as sleep usually halts all operations in the background, unless the community started incorporating a doEvents equivalent into a sleep command (which IMO should have been done years ago, if not already done). In fact I wonder if this is a python background issue rather than a regex issue.

    I’m just starting into regex and have started thinking along similar lines to what you mention here; I’m interested in seeing what others can add to this question by way of responses. Perhaps you could insert timestamps in a test document?

  • Looking for definitive RegEx reference to learn SciLexer.dll RegEx

    Locked
    5
    0 Votes
    5 Posts
    2k Views
    Chip CooperC

    Thank you so much for the quick reply! I appreciate that, as I had really started to get into that Wiki page. So, I’ll just go ahead and work on using that information, and see where it leads me. But, snippets are welcome. They’re great samples; Scott, Guy and others do such a great job of explaining what they’ve written.

  • Notepad ++ v 7.5.4 not responding on win 7

    4
    0 Votes
    4 Posts
    2k Views
    Chip CooperC

    @saikat-sahoo Yes, a clean install… if you have custom configurations, just be sure to back up those files; or can we presume that goes without saying. ;-)
    If you try to save to the Programs/Notepad++ directory, I think they’re read-only… but I don’t think that would be the default… so… try the above sounds right.

  • 0 Votes
    5 Posts
    2k Views
    Lucas ElliottL

    okay… Oh well. Feels like a pretty obvious feature. Hope it will be in there some day! thanks for your help.

  • Change Syntax Highlighting ("Language") Characters

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Stefan TravisS

    Update: Charcters outside the range 21-7F can form part of delimiter strings, but the strings must contain 21-7F characters.

    So, if “$” here represents code 1B - the “Escape” character - these would valid strings:

    $Start
    Finish$
    Modif$ier

  • "Find in files..." font size too big

    6
    1 Votes
    6 Posts
    2k Views
    g8tr1522G

    Also, didn’t mean to come off as annoyed. It’s just that when I did find my own simple solution, I was surprised no one else gave even a brief recommendation related to it. I was afraid no one would reply at all…

    Also, photobucket was definitely not my first choice to post my pic. I’ll have to find a better site for future posts. I just quickly picked one and hoped that no one would mind.

    Thanks again though.

  • Cannot open program SciLexer.dll certificate problem

    5
    0 Votes
    5 Posts
    5k Views
    Chip CooperC

    This comment may be off-topic for Np++ here; but, you shouldn’t have had to do that! I suppose, though rare, that some cosmic particle corrupted wintrust.dll but; that’s suspicious behavior… to me! I’d certainly not just settle for fixing that unless you ‘know’ why it was replaced, or corrupt… especially if not missing.

    If it got corrupted then it’s possible some 3rd party app may have corrupted the registry, or ‘something else is going on’ ?!? If you do auto backups of your registry I’d try to do a restore if you have one from a date prior to the issue to see if that fixes the problem. Since it may also ‘fix’?!? (cough) other issues that were the cause. At your discretion of course, as going back a few days, depending on what apps and system changes you’ve done would ‘naturally’ be affected by a restore; however not doing a restore might cause future issues left unresolved, such as a corrupted registry as in registry keys?!?

    At least do a Windows Defender, or other anti-virus scan, and a sfc (systems file check). IOW although the issue affected Np++, as you pointed out, other parts fo the system were also affected (infected?). I would want to rule out the latter!
    (Sorry for the slightly off -topic guys.)

  • found twice in the same line to report one result?

    Locked
    2
    1 Votes
    2 Posts
    826 Views
    Scott SumnerS

    @patrickdrd

    No, if what you mean would be to have one line in the Find result panel with the yellow highlighting on all individual matches in that line. If you don’t care about the highlighting, and simply want the single line in the results, some regular expression crafting could provide that. But I sense you are desiring something simpler…