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
    • dr ramaanandD

      With the help of a Regex, how to find "code" preceded by a "<" only if "code {" is absent between "<style" and "</style>" in the css section which is below ?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      12
      0 Votes
      12 Posts
      529 Views
      guy038G
      Hi, @dr-ramaanand and all, I do not understand why you think that the following regex is OK ! (?s)(<code.*?code\x20\{\s*font-family|<div id="google_translate_element"></div>\s*<script.*?</script>)(*SKIP)(*F)|<code Apparently, against the sample text, used before and pasted in a new tab : <code............>............</code> <style type="text/css"> code{ font-family: &quot;verdana&quot;; font-size: 19px; color: black; font-weight: bold !important; line-height: 1 !important; } } </style> <code............>............</code> <style type="text/css"> </style> <code............>............</code> bla blah bla blah bla blah <style type="text/css"> code{ font-family: &quot;verdana&quot;; font-size: 19px; color: black; font-weight: bold !important; line-height: 1 !important; } } </style> <code............>............</code> <style type="text/css"> </style> <code............>............</code> bla blah bla blah bla blah <style type="text/css"></style> <code............>............</code> <style type="text/css"> code { font-family: &quot;verdana&quot;; font-size: 19px; color: black; font-weight: bold !important; line-height: 1 !important; } } </style> bla blah <code............>............</code> A lot of text here, spanning many lines <style type="text/css"> code { font-family: &quot;verdana&quot;; font-size: 19px; color: black; font-weight: bold !important; line-height: 1 !important; } } </style> Some text/codes here <div id="google_translate_element"></div> <script type="text/javascript"> Some javascript here </script> MATCH ¯¯|¯¯ | v <code............>............</code> A lot of text here, spanning many lines <style type="text/css"> </style> Some text/codes here <div id="google_translate_element"></div> <script type="text/javascript"> Some javascript here </script> It just selects the last line beginning with <code ! However, in a previous post, you said : it should skip what is between <div id="google_translate_element"></div>\s*<script type="text/javascript"> and </script> … And, precisely, this last line beginning with <code, is, indeed, followed, further on, with the block : (?s)<div id="google_translate_element"></div>\s*<script type="text/javascript">.+?</script> Thus, it should not have been matched ?! Anyway, if this regex above seems to work nicely for you, that’s the main thing ! Best Regards, guy038
    • P

      Need help with find and replace using wildcards and in multiple files

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      11
      1 Votes
      11 Posts
      2k Views
      P
      @PeterJones Worked perfectly, thank you.
    • Claudia SvensonC

      How to auto-convert text (Umlaute) when changing file encoding from ANSI to UTF-8 BOM?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      15
      0 Votes
      15 Posts
      2k Views
      mpheathM
      The Python script I posted is expected to handle single byte errors from UTF8 decoding. Asian languages can be 2 byte for ANSI and so the script may need to get the following byte too to decode both bytes properly. Probably will not find recovery tools and the like that will fix mixed encoding errors as the solution in some cases might be worse then the problem though in this case tested OK. Once saved, then there might be no going back and so creating a backup before the operation would be wise. Inspect the results to confirm is OK.
    • rafaelloR

      Awesome Notepad++ Configs, settings and syntax highlighting

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      7
      3
      0 Votes
      7 Posts
      449 Views
      PeterJonesP
      @rafaello , IANAL, and I don’t own the trademark, but with your clarifications and updates, I believe you’re probably not violating the trademark (IMO). It’s good to see someone who is willing to accept such feedback (rather than digging in your heels for a while, like happened with the aforementioned fork).
    • donhoD

      Notepad++ v8.9.7 Release Candidate

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      5
      5 Votes
      5 Posts
      877 Views
      donhoD
      FYI: Notepad++ v8.9.7 RC2 is available now: https://github.com/donho/notepad-plus-plus/releases/tag/RC2
    • Sylvester BullittS

      When Is the Next Update?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · · bug with 8.9.6.4 html
      4
      0 Votes
      4 Posts
      864 Views
      PeterJonesP
      @Sylvester-Bullitt , Release Candidate is available. You probably want to test this version, and report any continued problems with the Open File feature ASAP.
    • R

      Unable to open files within an opened file

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      3
      0 Votes
      3 Posts
      408 Views
      R
      @PeterJones Perfect thank you very much!
    • R

      SnippetPlus v2.1 released. Snippets, SurroundWith and SurroundWith Multiline plugin

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      3
      1 Votes
      3 Posts
      426 Views
      R
      @rdipardo thank you for pointing that out. I will check and do the needful.
    • guy038G

      Generic Regex : How to use the couple of "Backtracking Control" verbs (*SKIP)(*FAIL) or (*SKIP)(*F) in regexes

      Watching Ignoring Scheduled Pinned Locked Moved Blogs
      9
      4 Votes
      9 Posts
      4k Views
      dr ramaanandD
      Another example can be seen at https://community.notepad-plus-plus.org/topic/27601/with-the-help-of-a-regex-how-to-find-code-preceded-by-a-only-if-code-is-absent-between-style-and-style-in-the-css-section-which-is-below/4
    • E

      Modern text file icon

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      1
      1
      0 Votes
      1 Posts
      279 Views
      No one has replied
    • CoisesC

      Search++: A work in progress

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      98
      5 Votes
      98 Posts
      25k Views
      CoisesC
      Search++ version 0.6 is available. The big change in this version is the addition of a Search in Files dialog: [image: 1783211949656-7beeed4c-7d6c-4c3e-8b34-84e9473c4215-image.jpeg] There have been a few small fixes elsewhere — by now I’ve forgotten what they were — but mostly this release is for Find in Files. Adding that led to quite a few changes in code it shares with the existing functions, so unfortunately there could be new bugs in old functions. On the whole, though, handling of the search results list should be improved for all functions that use it. If you don’t like to read help, at least don’t forget to try right-clicking the text entry boxes and items in the file list. Replace in Files is planned but not yet implemented.