Community
    • Login

    Unable to use Replace in files

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    22 Posts 4 Posters 5.4k Views 2 Watching
    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 Offline
      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 Offline
        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors