Community
    • Login

    Unable to use Replace in files

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    22 Posts 4 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dr ramaanandD
      dr ramaanand @Alan Kilborn
      last edited by dr ramaanand

      This Regular expression helped me replace in files (multiple files) only what I wanted: (?:<p(?!\w)[^>]*?color\s*:\s*(?:(black))[^>]*?>(?(1)(?:\s*<span(?!\w)[^>]*?>)?)|<span\b[^>]*?color\s*:\s*black[^>]*?>|<li\b[^>]*?style[^>]*?color\s*:\s*black[^>]*?>\s*<span\b[^>]*?>)(?s)\s*<code\b(?:".*?"|'.*?'|[^>]*?)+>(*SKIP)(*FAIL)|<code\b[^>]*?style[^>]*?background-color\s*:\s*transparent[^>]*?> as asked right on top in my first question of this thread, that is, it helps find <code style="background-color: transparent;"> if it is not preceded by <p.......color: black...>(any white spaces, including a new line)<span.......> or <span.......color: black...>

      1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by guy038

        @dr-ramaanand,

        Take the time to read my last e-mail to you, where I explained the differences between two simple regexes containing, each, the (*SKIP)(*F) syntax !

        BR

        guy038

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors