• DSpellCheck plugin does not work for json files

    3
    0 Votes
    3 Posts
    601 Views
    artie-finkelsteinA

    Another alternative is to use the Windows ‘mklink’ command line utility and create a hardlink to the file, assuming an NTFS formatted disk. Mklink will complain if the target disk is not using the NTFS format.

    > mklink /h file.json.txt file.json

    There will only be one file using storage space on the disk, but two ways of accessing the contents (be careful if both are opened at the same time; Notepad++ will gladly have both views open at the same time and may warn about changes made using the the other view).

    I use the ‘added’ .txt extension to assist the OS in keeping both views together when using name listings, e.g. “dir”. The Explorer preview pane will show the contents as text (even if the original file isn’t text, e.g., .pdf or .jpg). The extra extension also assists me in remembering which is the real or base file and which is the alternate view I created to get around Windows obsession with extension based file format determination.

    The file will persist (continue to use disk space) until both names are deleted, either from the command line or in Explorer.

    Not all disk space applications understand ‘hardlinks’ and will incorrectly show both files using disk space.

  • Auto opening backup is not working

    4
    0 Votes
    4 Posts
    205 Views
    Игорь НовиковИ

    Issue happens after windows is getting updates only. If I close/open N++ OR restart Windows without getting updates then all sessions are getting opened.

  • Search for a text and copy the next lines of codes

    5
    2 Votes
    5 Posts
    358 Views
    Kev AlejandrinoK

    @Alan-Kilborn said in Search for a text and copy the next lines of codes:

    (?-s)SEARCHME(?:.\R){3}\K.

    Thank you! It works just what I wanted.

  • Find regex file name

    3
    0 Votes
    3 Posts
    798 Views
    David ArdaizD

    I need to search for file names in html code.

    Text to search D: \ Fitos \ excel \ ([1-9] [0-9] *) (. Xlsx “target =” _ top "> Old pdf)
    Replace with D: \ Fitos \ excel2 \ $ 2 (.xlsx “target =” _ top "> Old Pdf) with this regex search I find Excel files like 13037.xlsx

  • RegEx omitting the round brackets

    6
    0 Votes
    6 Posts
    1k Views
    Scott NielsonS

    @PeterJones yea, it worked. I had a </p> in my next search - that’s why it di’n’t work before. Thanks a lot man!

  • Macro changes my (macro) definition

    4
    0 Votes
    4 Posts
    416 Views
    Alan KilbornA

    If I try recording a macro for what I think you are trying to do (but from your description it is not 100% clear to me what this is), I get the following, and it always works for me:

    <Macro name="xxx" 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="&#x00A0;" /> <Action type="3" message="1625" wParam="0" lParam="0" sParam="" /> <Action type="3" message="1602" wParam="0" lParam="0" sParam="&amp;nbsp;" /> <Action type="3" message="1702" wParam="0" lParam="512" sParam="" /> <Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /> </Macro>
  • 0 Votes
    5 Posts
    219 Views
    Robin CruiseR

    super answer @guy038 thanks.

    I made a short version of yours:

    <title>\K(?![^\x00-\x7F]+).*?\| - finds the first line

    <title>\K([^\x00-\x7F]+).*?\| - finds the second line

  • Markdown in dark mode looks wrong

    4
    0 Votes
    4 Posts
    3k Views
    mere-humanM

    Don’t confuse dark mode with “dark” theme.
    Dark mode is only about the UI elements (everything except the document area).
    Dark theme is about the document area.

    This is a known problem, it is related to the dark theme.
    There are numerous issues about this:
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/6140
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9649

  • Finding and deleting a series of lines

    15
    0 Votes
    15 Posts
    4k Views
    Alan KilbornA

    @guy038

    Actually, what you’ve specified is for finding some… , not deleting some…

    To delete, we need to specify:

    SEARCH (as above) REPLACE leave this field blank

    :-)

  • file:///folder opens CMD instead of explorer

    8
    0 Votes
    8 Posts
    597 Views
    tho-gruT

    Hello everyone,

    One solution to my problem is to replace all occurrences of open with command-exec in the registry file:

    Windows Registry Editor Version 5.00 ; Command Prompt [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\XxX-01MenuCmd] "MUIVerb"="@shell32.dll,-22022" "Icon"="cmd.exe" "ExtendedSubCommandsKey"="Directory\\ContextMenus\\XxX-MenuCmd" [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\background\shell\XxX-01MenuCmd] "MUIVerb"="@shell32.dll,-22022" "Icon"="cmd.exe" "ExtendedSubCommandsKey"="Directory\\ContextMenus\\XxX-MenuCmd" [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\ContextMenus\XxX-MenuCmd\shell\command-exec] "MUIVerb"="@shell32.dll,-8506" "Icon"="cmd.exe" [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\ContextMenus\XxX-MenuCmd\shell\command-exec\command] @="cmd.exe /s /k pushd \"%V\"" [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\ContextMenus\XxX-MenuCmd\shell\runas] "MUIVerb"="@shell32.dll,-37444" "Icon"="cmd.exe" "HasLUAShield"="" [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\ContextMenus\XxX-MenuCmd\shell\runas\command] @="cmd.exe /s /k pushd \"%V\""

    Now I have the enhanced context menu at the folder and a double click on file:///c:\tmp starts the windows file explorer.

    Remark: The items in the submenu are displayed by the lexical order (1. command-exec, 2. runas …).

    Thanks for you help.

    Kind Regards
    Thomas

  • Find line before specific text

    2
    0 Votes
    2 Posts
    320 Views
    guy038G

    Hello, @elise-baribault and All,

    Not difficult with regular expressions !

    Open the Mark dialog ( Ctrl+ M )

    SEARCH (?-si)^EL[:;]\x20\K\d+(?=\R.+\RABNORMAL PROGRAM STOP$)

    Tick the three options Bookmark line, Purge for each search and Wrap around

    Un-tick all other box options

    Select the Regular expression search mode

    Click on the Mark All button

    Click on the Copy Marked Text button

    Open a new tab ( Ctrl + N )

    Paste the clipboard contents ( Ctrl + V )

    Et voilà !

    After clicking on the Mark All button you may, either :

    Right-click into the bookmark margin and choose the Copy bookmarked Lines option

    Use the menu option Search > Bookmark > Copy Bookmarked Lines

    Best Regards

    guy038

  • User Extensions for Language Recognition not working for custom styles

    7
    0 Votes
    7 Posts
    344 Views
    Tobias GebhardT

    Ok, I checked with the original Obsidian.xml and it works now.
    Although the Lua block is the same, this strange behavior still exists. (They are only differences in other languages or maybe because of Global Style).
    If anyone wants to further investigate, I would upload the files here, but I can’t.

    Anyway, thank you for the help.

  • Declare and Underscor Multiple Variables

    7
    0 Votes
    7 Posts
    242 Views
    guy038G

    Hello, @Nathan-heath, @peterjones, @alan-kilborn, @astrosofista and All,

    Here is my contribution, which merge the two regex S/R in one S/R only :

    SEARCH (?-i)^(?!Double|$)|^Double\h

    Replace Double_

    So, from your example :

    Double Infuse with Vitality; Double Inkling Summoning; Double Kasmina Enigma Sage;//Kasmina comma Double Killian Ink Duelist;//Killian comma Double Lorehold Apprentice; Double Lorehold Command; Double Lorehold Excavation; Double Lorehold Pledgemage; Double Maelstrom Muse; Double Magma Opus; Double Make Your Mark; Double Manifestation Sage; Double Moldering Karok; Double Mortality Spear; Double Needlethorn Drake; Double Oggyar Battle-Seer; Double Owlin Shieldmage; Double Pest Summoning; Double Practical Research; Prismari Apprentice; Prismari Command; Prismari Pledgemage; Quandrix Apprentice; Quandrix Command; Quandrix Cultivator; Quandrix Pledgemage; Quintorius Field Historian; Radiant Scrollwielder; Reconstruct History; Relic Sloth; Returned Pastcaller; Rip Apart; Rise of Extus; Rootha Mercurial Artist; Rushed Rebirth; Shadewing Laureate; Shadrix Silverquill; Silverquill Apprentice; Silverquill Command; Silverquill Pledgemage; Silverquill Silencer; Spectacle Mage; Spirit Summoning; Spiteful Squad; Square Up; Stonebound Mentor; Tanazir Quandrix; Teach by Example; Tend the Pests; Thrilling Discovery; Vanishing Verse; Velomachus Lorehold; Venerable Warsinger; Witherbloom Apprentice; Witherbloom Command; Witherbloom Pledgemage;

    You should get the expected output :

    Double_Magma Opus; Double_Make Your Mark; Double_Manifestation Sage; Double_Moldering Karok; Double_Mortality Spear; Double_Needlethorn Drake; Double_Oggyar Battle-Seer; Double_Owlin Shieldmage; Double_Pest Summoning; Double_Practical Research; Double_Prismari Apprentice; Double_Prismari Command; Double_Prismari Pledgemage; Double_Quandrix Apprentice; Double_Quandrix Command; Double_Quandrix Cultivator; Double_Quandrix Pledgemage; Double_Quintorius Field Historian; Double_Radiant Scrollwielder; Double_Reconstruct History; Double_Relic Sloth; Double_Returned Pastcaller; Double_Rip Apart; Double_Rise of Extus; Double_Rootha Mercurial Artist; Double_Rushed Rebirth; Double_Shadewing Laureate; Double_Shadrix Silverquill; Double_Silverquill Apprentice; Double_Silverquill Command; Double_Silverquill Pledgemage; Double_Silverquill Silencer; Double_Spectacle Mage; Double_Spirit Summoning; Double_Spiteful Squad; Double_Square Up; Double_Stonebound Mentor; Double_Tanazir Quandrix; Double_Teach by Example; Double_Tend the Pests; Double_Thrilling Discovery; Double_Vanishing Verse; Double_Velomachus Lorehold; Double_Venerable Warsinger; Double_Witherbloom Apprentice; Double_Witherbloom Command; Double_Witherbloom Pledgemage;

    In addition, if you re-run this regex S/R, nothing else is matched and replaced. Nice, isn’t it ?

    Best Regards,

    guy038

  • Difficulty with using backreferences/capture groups in find/replace.

    5
    0 Votes
    5 Posts
    275 Views
    guy038G

    Hello, @james-norton, @alan-kilborn, @terry-r and All,

    BTW, note that there’s an important difference between :

    To search for IPV4 addresses, in a file containing valid IVP4 addresses, only

    To search for valid IPV4 addresses, in a file which may contain some non valid IPV4 addresses !

    In the first case, as the @terry-r’s solution, simply use the almost obvious regex \b(\d{1,3}\.){3}\d{1,3}\b

    In the second cas, use one of the two regexes, below :

    (25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(*FAIL)|\b((?1)\.){3}(?1)\b

    (?(DEFINE)(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))\b((?1)\.){3}(?1)\b

    Notes :

    In the first regex, once the part (25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d) is stored as group 1, the (*FAIL) control verb discards this match but this regex part can be re-used with the syntax (?1). Then, the second alternative \b((?1)\.){3}(?1)\b does match a valid IPV4 address !

    The second regex uses a special conditional syntax with the key expression (DEFINE). which stores, as above, the part 25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d, between parentheses, but which is never matched, by definition. So the effective regex is just the part \b((?1)\.){3}(?1)\b, coming next, which match valid IPV4 addresses only

    Best Regards,

    guy038

  • Find files with multiple Strings

    5
    0 Votes
    5 Posts
    2k Views
    PeterJonesP

    All,

    See also my in-development expressions for generic logic “gates” in regular expressions: AND, OR, XOR, NOR, NAND

    Some day, they might get a blog post all of their own, rather than be buried in that thread. But they are still in-development, so they’ll stay there for now.

  • run JavaScript on Noepad++ file

    3
    0 Votes
    3 Posts
    3k Views
    JRJ

    @PeterJones lol! great repsonse. ill look into the jN plugin

  • regex replace syntax

    2
    0 Votes
    2 Posts
    140 Views
    Terry RT

    @I-neuw said in regex replace syntax:

    What am I missing?

    Well, it could be anything, as we don’t know what P++ is, maybe you meant to say NPP or Notepad++.
    A regex I’d use would be
    Find What:\x20
    Replace With:\n

    But then be aware that a \n is not normal for a windows text file. Windows uses \r and \n normally. Unix and Mac use one of them each (different ones).

    Possibly showing a bit more detail and examples if possible of what you saw when trying to do the replacement might help us to understand what could have gone wrong.

    Terry

  • What is going on with this user defined language?

    14
    0 Votes
    14 Posts
    913 Views
    Ksomeone Msomeone 0K

    @PeterJones said in What is going on with this user defined language?:

    @Ksomeone-Msomeone-0 said in What is going on with this user defined language?:

    I’ll try to get around to bug reporting this.

    It looks like someone did report this as issue#10007 – given the example screenshot, I’m assuming it’s the same person, despite the different username.

    That’s mine, yes.

  • regex specific char change by anther without change the found sentence

    2
    0 Votes
    2 Posts
    151 Views
    PeterJonesP

    @Kirill-Nudelman ,

    Doesn’t a normal Search > Replace, Find What = ., Replace with = _, Search Mode = Normal do that? It does for me.

  • YAML extension, Search 2 Value and Replace

    10
    0 Votes
    10 Posts
    810 Views
    Mark LozadaM

    @PeterJones
    I have my final search string, thanks to you sir! In order for the search to distinguish if it’s missing the “Slots” entry, I have to searched from "Range: to “Job:”

    Search:
    (Range: \d)+(\s*)(?!Slots: \d+)(\s*)Jobs:$
    Replace:
    \1 \r\n\tSlots: 4 \r\n\tJobs: