• How to open a path in Windows Explorer?

    8
    0 Votes
    8 Posts
    5k Views
    Mark CreagerM

    Thanks, @PeterJones . You are correct, I could map it, found it at no 78 on my list - I only have version 7.4.1 available to install. Appreciate the help from everybody.

  • random sentence

    Locked
    6
    0 Votes
    6 Posts
    2k Views
    pouemesP

    thanks scott

  • When was $(SYS.var) added to notepad++

    Locked
    3
    1 Votes
    3 Posts
    819 Views
    Scott SumnerS

    @PeterJones

    I’m guessing that when those docs were originally created, Notepad++ and NppExec were more “tightly coupled” so that some documentation was written with “blurry lines” between the two.

  • SQL quote color syntax issue

    7
    0 Votes
    7 Posts
    3k Views
    Emmanuel GorandE

    Thanks.

    Unfortunately I have nothing but User Defined Language is that drop-down…

    Maybe something is missing with the plugin (located in C:\Program Files\Notepad++\plugins\PoorMansTSqlFormatterNppPlugin).

  • In a single line with Regular expression

    Locked
    7
    0 Votes
    7 Posts
    2k Views
    guy038G

    Hello, @ALISSAbry, @gurikbal-singh, @cipher-1024 and All,

    Ahrrrrrhh ! You’re perfectly right, @cipher-1024 : my regex does not work, if no extra blank lines exist :-((

    I first had found a correct regex. However, as I also wanted to delete possible pure blank lines, I tried to improve my regex against a text containing some blank lines

    But I had not tested it again, with a simple text, without extra blank lines. My bad !

    So a correct regex could be :

    SEARCH (\R){2,}|(?<!=)\r\n(?!=)

    REPLACE ?1\1:\x20

    Notes :

    Only, the second alternative have changed (?<!=)\r\n(?!=). It will replace any line-break, not preceded and not followed with an equal sign =. In other words, only the line breaks located between two data lines

    Note that we must replace the \R syntax with the \r\n ( or with \n if you’re working with Unix files ! ) Why ? Just because \R represents \r\n, but in order to match an overall regex, \R may match only \r or \n

    For instance, if you try to match the regex (?<!=)\R(?!=) at the end of the sentence …YEScrlf, it would grab only the \r part of the line break, before \n. Indeed, in that case, the \r character is, both, not preceded with an = sign ( as it is the letter S) and not followed with an = sign ( as it is the \n symbol )

    Cheers,

    guy038

  • Creating a Macro

    Locked
    2
    0 Votes
    2 Posts
    763 Views
    Terry RT

    @Gustavo-Garcia
    The regex (regular expression) for finding and marking those lines would be, using the Find function (with bookmark line also ticked)
    Find What:^\$
    Use Search mode as ‘regular expression’ and tick ‘wrap around’.

    If you did that then you can then use the Search, bookmark submenu to cut or copy these lines to another tab.

    Now a macro is in essence just the steps you take (above) but with first selecting Macro, Start recording. Then you’d type in the regex (as shown above), by first selecting the Mark function, just as you would if using Mark normally. You need to complete by pressing ‘Mark All’, then Close. Remember that once you have completed these steps you would then select Macro, Stop recording. At this point the steps have been recorded, but not yet saved. You then need to select Macro and Save Recorded Macro, give it a name. I would then exit Notepad and re-enter to have it written to an XML file in the Notepad++ environment.

    You will be able to run it again and again by selecting it from the Macro menu.

    Terry

    In my test the macro I created in shortcuts.xml file was:
    <Macro name=“$@start” Ctrl=“no” Alt=“no” Shift=“no” Key=“0”>
    <Action type=“3” message=“1700” wParam=“0” lParam=“0” sParam=“” />
    <Action type=“3” message=“1601” wParam=“0” lParam=“0” sParam=“^$” />
    <Action type=“3” message=“1625” wParam=“0” lParam=“2” sParam=“” />
    <Action type=“3” message=“1702” wParam=“0” lParam=“786” sParam=“” />
    <Action type=“3” message=“1701” wParam=“0” lParam=“1615” sParam=“” />
    </Macro>

    Some of the information can be rather hard to understand, and it’s even harder to edit once created, so if you don’t get it right first time, you will likely need to delete that macro and start again.

    This file can be in several places, for me on Windows 7 it is %appdata%\notepad++. Be careful with opening this file using Notepad++ as it gets written to if required upon exiting Notepad++.

  • Comparing autosave and backup options

    Locked
    1
    0 Votes
    1 Posts
    503 Views
    No one has replied
  • Notepad++ Not Responding

    Locked
    4
    0 Votes
    4 Posts
    4k Views
    chcgC

    There is a known performance issue with 7.5.9, see https://notepad-plus-plus.org/community/topic/16468/notepad-7-5-9-release/21
    Is this the behaviour you observe?

  • notepad ++ 7.5.9 won't open

    Locked
    1
    0 Votes
    1 Posts
    383 Views
    No one has replied
  • Trying to use Column Mode without Success

    Locked
    3
    0 Votes
    3 Posts
    809 Views
    rinku singhR

    @Scott-Sumner thank you.

  • 0 Votes
    2 Posts
    773 Views
    PeterJonesP

    First option: use a JSON parser or an appropriate module or library in your favorite programming language
    Second option: use a regular expression. Note, this solution will be highly specific to the data.

    You gave only one example, and no counter examples, so I have no way of testing whether this matches all your circumstances correctly, and whether it will correctly leave other lines un-edited. But assuming you want the value of the “body” element, and assuming all those quotes are straight ASCII quotes " and thus valid JSON (and not curly quotes “ ”, which the forum may have kindly changed your straight quotes into), and assuming there are no embedded newlines in the value, then I successfully tried this:

    find = (?-s).*"body":"([^"]+)".* replace = $1 regular expression

    There are other expressions that would also match your description, but this is the first I came up with that did what you said you wanted.

    Note, this will not work if there are embedded straight-quotes in the value of the body element. If there are, you will need a true JSON parser, because while you can craft specific regexes if you know the maximum level of embedded quotes, and/or know the escaping mechanism, if you get more complicated than this, it’s really best to use a dedicated JSON-parsing library.

    FYI: if you have further regex needs, study this FAQ and the documentation it points to. Before asking a new regex question, understand that many of us will expect you to show what data you have (exactly), what data you want (exactly), what regex you already tried (to show that you’re showing effort), why you thought that regex would work (to prove it wasn’t just something randomly typed), and what data you’re getting with an explanation of why that result is wrong. When you show that effort, you’ll see us bend over backword to get things working for you. If you need help formatting the data so that the forum doesn’t mangle it (so that it shows “exactly”, as I said earlier), see this help-with-markdown post, where @Scott-Sumner gives a great summary of how to use Markdown for this forum’s needs.

  • Interprete ANSI color

    Locked
    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Delete empty fields with notepad

    Locked
    5
    0 Votes
    5 Posts
    972 Views
    zyllycarmyZ

    thank you very much helped me, sorry for the error, is that I’m with my baby taking care of it and working at the same time, solve the problem, thank you very much

  • 0 Votes
    2 Posts
    650 Views
    Scott SumnerS

    @Æþelleo-Durkin

    I really wish people would stop with the title says it all thing…but I suppose that is too much to ask for. :-)

    This bug was discussed here and recently a fix was proposed. Have to wait now to see if/when that fix gets integrated into the branch the software is released from; subsequent to that you will see it in an actual Notepad++ release.

    Looking at those links now, it isn’t entirely clear if an inability to change the font itself (rather than just its italics/bold attributes) was examined/addressed. If you think it wasn’t, you might want to add a comment to the issue about it.

  • Set updater proxy does not change

    6
    0 Votes
    6 Posts
    5k Views
    SinghRajenMS

    Try launching Npp in admin mode. It should work.

  • Request: Change in how bookmarks are set/jumped to

    7
    2 Votes
    7 Posts
    5k Views
    László BotkaL

    @Scott Sumner

    I found an issue in Bookmark Manager, and reported it in
    https://bitbucket.org/ViRuSTriNiTy/nppbookmarkmanager/issues/24/cursor-jumps-from-bottom-to-top
    "
    Using bookmark manager 1.1.97 in npp 7.5.9

    After creating and removing a bookmark (with toggle or with clear bookmarks), when I move down with the cursor to the bottom of the window, and go down further, sometimes npp works funny - instead of scrolling down one line at the bottom , the next line will appear at the top of the window. This doesn’t happen in every case, maybe it depends on the position of the removed bookmark.

    It disappears only when I close the file and edit an other file.

    The issue doen’t exists in Ver 1.0.86.

    Maybe the the following modification causes this issue:
    Version 0.1.0.97
    caret is now centered vertically when jumping to a bookmark
    "

  • Building Notepad++ in Visual Studio

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Help with the regexes

    8
    0 Votes
    8 Posts
    2k Views
    Giuseppe PulitanòG

    Hi guy038 I sent you the email with the file at the andress :

    Many thanks

  • Close all

    3
    0 Votes
    3 Posts
    1k Views
    Munsen TidocoM

    Thank you. It worked perfect when I kept the key pressed “n”

  • Add XHTML language

    Locked
    1
    0 Votes
    1 Posts
    622 Views
    No one has replied