• 0 Votes
    2 Posts
    372 Views
    PeterJonesP

    @John-Slee ,

    Use the ? modifier to make an element of your regex less greedy (“find the shortest”).

    Good luck.

    ----

    Do you want regex search/replace help? Then please be patient and polite, show some effort, and be willing to learn; answer questions and requests for clarification that are made of you. All example text should be marked as plain text using the </> toolbar button or manual Markdown syntax. Screenshots can be pasted from the clipboard to your post using Ctrl+V to show graphical items, but any text should be included as literal text in your post so we can easily copy/paste your data. Show the data you have and the text you want to get from that data; include examples of things that should match and be transformed, and things that don’t match and should be left alone; show edge cases and make sure you examples are as varied as your real data. Show the regex you already tried, and why you thought it should work; tell us what’s wrong with what you do get… Read the official NPP Searching / Regex docs and the forum’s Regular Expression FAQ. If you follow these guidelines, you’re much more likely to get helpful replies that solve your problem in the shortest number of tries.

    -----
    I invoked the “Dail Critereon” for my answer

  • Search and relace - how to put in a line break?

    11
    0 Votes
    11 Posts
    561 Views
    EkopalypseE

    Should we create a cheat sheet :-D

  • Emojis Not Showing On Windows 7

    6
    0 Votes
    6 Posts
    1k Views
    Michael VincentM

    @astrosofista said in Emojis Not Showing On Windows 7:

    However, after applying the script you provided, emojis are correctly displayed

    Great! Note that N++ version 7.8.7+ - that is to say whatever version will next be released looks to have this SC_TECHNOLOGY_DIRECTWRITE as an option in the Settings => Preferences => MISC. dialogue.

    But a script for now is just as good while we wait!

    Cheers.

  • Right-clicking file no longer maximizes Notepad++

    2
    0 Votes
    2 Posts
    460 Views
    EkopalypseE

    @Daniel-Hall

    So what did you do that it stopped working? Updated Npp?
    Updated windows? Installed some other app?
    What npp version are you running? (Can be seen as debug-info from ? menu)

  • Find and change using key / dictionary file

    3
    0 Votes
    3 Posts
    613 Views
    Grzegorz KwiatkowskiG

    I found the Advanced Fin and Replace program. However, I was hoping that a brilliant notepad ++ can do that too. I would have one program less on my list;)

    Thank you for your help.

  • Suggestion: Option to Close All before Session Load

    15
    0 Votes
    15 Posts
    866 Views
    Dwayne RobertsD

    @PeterJones My preference would be for the Close All to be executed only when a new session is loaded, and then only optionally (either by a setting or a prompt). I think, for now I’ll just try to remind them at the beginning of each class to Close All before loading the new session. Thanks for the suggestions!

  • 0 Votes
    3 Posts
    2k Views
    Nikhil ChavanN

    Hi @guy038

    Thanks alot!!!
    It worked…😊🍻

  • 0 Votes
    1 Posts
    218 Views
    No one has replied
  • Help with Zenburn Theme

    2
    0 Votes
    2 Posts
    450 Views
    EkopalypseE

    Themes is something that doesn’t really work well in Npp, since, at first,
    it was only designed to “theme” the document, and later it was,
    more or less, adapted to the rest of the ui.
    Glitches like the one you mentioned are therefore unfortunately part of the problem.

  • Upper case letter in replace

    7
    0 Votes
    7 Posts
    342 Views
    Hakunamatata67H

    You’re the best guy038!
    Thank you so much

    Take care

  • how to compress a file to .rar in notepad

    2
    0 Votes
    2 Posts
    344 Views
    andrecool-68A

    Just like making a live cow out of a sausage

  • How to delete a complete tag with specific content

    15
    1 Votes
    15 Posts
    7k Views
    Luiz Antonio Souza RibeiroL

    @guy038 said in How to delete a complete tag with specific content:

    (?s)<Report>(?:(?!</Report>).)<Active>0000000000</Active>.?</Report>

    Thank you. It works for me in a similar case.

  • Find the Line that contains the MD5 code!

    3
    0 Votes
    3 Posts
    363 Views
    Sarah DuongS

    @guy038 Thanks. You’re boss this forum.

  • How change icon per extension (windows)

    4
    0 Votes
    4 Posts
    775 Views
    BobSquarePantsB

    Done,

    So it quite easy. You should let .ini .txt attach to their default apps (notepad.exe)
    and simply change manually the reg info from
    HKEY_CLASSES_ROOT\inifile
    HKEY_CLASSES_ROOT\inifile\shell\open\command pointing to Notepad++
    HKEY_CLASSES_ROOT\inifile\DefaultIcon The .ico of your choice

    and that it.
    You should avoid Windows to make the binding for you :)

  • How to replace all content from XML tag with blank in notepad++?

    6
    0 Votes
    6 Posts
    2k Views
    astrosofistaA

    @PeterJones said in How to replace all content from XML tag with blank in notepad++?:

    Nitpick: it’s the . operator that is affected by (?-s), not the *, since the s flag is “dot matches newline”. But . wasn’t used in your expression, either, so the flag-clearing is still useless. :-)

    Yep, my bad, I stated a wrong reason, thank you for notice it :)

    Well, not completely useless. As we help people in the forums, always including either (?-s) or (?s) will ensure we never have to care what the status of their checkbox is, so having one of the two in our default answer-regex is a good idea. ;-)

    Agree, learned that in this forum, so the (?-s) modifier is my default setup.

    Cheers

  • Windows exclamation macro beeps.. at what ?

    6
    0 Votes
    6 Posts
    375 Views
    guy038G

    Hello, @terry-gaff-0 and All,

    I second what Alan said :

    This sounds like a potentially dangerous situation.
    Well, for your data, not for you.

    Indeed, you must define what to do, when any of your searches is unsuccessful. If you’re using the regular expression search mode, it usually means that some templates, in your data, are not taken in account by the overall regex search expression !

    Best regards,

    guy038

  • Negative number highlighting

    2
    0 Votes
    2 Posts
    311 Views
    EkopalypseE

    @Chris-Betts

    If, for example, I define ( and ) as operators I do get the following

    6aa6ec65-567c-49bf-8d9f-8e74de8492eb-image.png

    How did you define the brackets, as delimiters and if so have you allowed nesting with numbers?

  • Autocomplete function describe hint doesn't show up

    5
    0 Votes
    5 Posts
    351 Views
    Mr.KleinerM

    @Michael-Vincent

    Oh, yeah, I see. Thanks ! I thought it’s gonna add the tip to the word itself. Like when you type “abs” you get a tip…

    Is it possible to do so though ?

    And is it possible to start my function with " ?

  • FunctionList + Bookmarks = ???

    9
    0 Votes
    9 Posts
    1k Views
    whatsinanameW

    The good news: thanks to the screenshot, now I know that it should be possible (somehow).
    Will contact the author of the plugin for details.

    Thank you both!

  • beginner: run and compile c++ program!

    2
    0 Votes
    2 Posts
    540 Views
    EkopalypseE

    @Nivrutti-Pawar

    g++ seems to have an issue here g++.exe: error: ô1prg.cppö: No such file or directory

    Where does ô and ö come from? Are you using the correct "
    and not the “? Are you running with an unusual OS setup?

    cmd /c "$(CURRENT_DIRECTORY)\a.exe" this will most probably fail
    as I would expect 1prg.exe to be created.