Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • All categories
    • M

      How to multiline regex find + replace a block of code that varies across multiple files

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      0 Votes
      3 Posts
      47 Views
      CoisesC
      @MayTheCatgirl said: I tried using the following expression with “. matches newline” enabled and it finds the code block: [beginning of code].+?[end of code] However Notepad++'s find and replace does not support multiline find and replace I’m wondering what you mean by “does not support multiline find and replace.” I think you must mean that you can’t easily enter a replace expression that contains multiple lines. and when I use it this way to paste the 100-line block of code where I want it, it messes up the formatting and cuts off the last few lines. There are a couple possible problems. I believe there is a character limit (I don’t recall what it is) to how much you can put in the Replace box. But also… are you considering that you can’t just blindly copy a block of code into that box, because some characters have special meanings? In particular, backslashes, parentheses, and depending on the context, dollar signs, question marks and colons, have special meanings and must be escaped. I assume you are substituting the original content, so you’re using something like: Find: OLDPREFIX(.*?)OLDSUFFIX Replace: NEWPREFIX$1NEWSUFFIX to do it? Or is the replacement content exactly the same every time, using no part of the original content? I’d love to just use the default Notepad++ one for this as its “find in files” feature is a lot more helpful than requiring me to open all 300 files I want to search through but it seems that is not an option. It can probably be done. It might have to be done in a couple steps instead of just one, if the replacement expression has too many characters to put in the box all at once.
    • S

      Multi line tab bar but with maximum X lines ?

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      3
      1
      0 Votes
      3 Posts
      88 Views
      S
      @Michael-Vincent Data conciergery is a computer’s job
    • donhoD

      Notepad++ release 8.9.7

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      13
      2 Votes
      13 Posts
      8k Views
      PeterJonesP
      @Ian-Eales , That sounds more like a feature request than something that used to work but broke during 8.9.7 – so it’s not a regression. The FAQ here explains where requests for new features need to go …
    • F

      Compare Plus (and Compare) plugins hanging

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      4
      0 Votes
      4 Posts
      363 Views
      P
      Hi @franz-joli , I haven’t come across such behavior myself and cancelling compare on my side has always been working flawlessly. As @peterjones had already kindly suggested, If you continue to experience such problem you could open an issue here and describe it step-by-step starting with your Notepad++ setup and plugin version (by providing the Notepad++ Debug Info... from its ? menu) and it would be great also if you could provide example files to try on my side. We can discuss the problem further there. Thank you Peter, precise and helpful as always! :)
    • donhoD

      Notepad++ v8.9.8 Release Candidate

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      2
      5 Votes
      2 Posts
      489 Views
      donhoD
      FYI v8.9.8 RC is changed to RC2: https://github.com/donho/notepad-plus-plus/releases/tag/RC2