Community
    • Login

    How can I search and replace all all text within a string, such as style="height: width:;"

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 339 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.
    • Ali HussainA Offline
      Ali Hussain
      last edited by

      <br>
      -ubiquitin ligase essential role in degradation of viral proteins and attachment to MHC complex I
      <div>
      -Ubiquitin ligase
      <i>
      initiates the UPP
      </i>
      by recognizing specific protein substrates and
      <b>
      catalyzing the attachment of ubiquitin
      </b>
      ; ubiquitin tagged proteins → broken down by proteasome to peptide fragments which can be recycled into amino acids
      </div>
      <div>
      -peptide fragments coupled to MHC in endoplasmic reticulum → CD8+ T cells can recognize and trigger apoptosis
      </div>
      <div>
      <img class=“” src=“L10238.jpg” style=“height: 446px; width: 700px;”>
      <img class=“” src=“L24978.jpg” style=“height: 842px; width: 484px;”>
      <br>
      </div>

      The above is an example, how can I use the search and replace that string and remove it such as:
      <img class=“” src=“L10238.jpg”>
      <img class=“” src=“L24978.jpg”>

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

        Hello, @ali-Hussain and All,

        I suppose that the following regex S/R should do the job :

        SEARCH (?-s)(<img class.+?)\x20style=.+?>

        REPLACE \1>

        Of course, select the Regular expression search mode and, possibly, the Wrap around option


        Even if two of more <img .....> exist on a single line, it will change :

        <img class="" src=“L10238.jpg” style=“height: 446px; width: 700px;”>  <img class="" src=“L24978.jpg” style=“height: 842px; width: 484px;”>
        

        Into :

        <img class="" src=“L10238.jpg”>  <img class="" src=“L24978.jpg”>
        

        Best Regards,

        guy038

        1 Reply Last reply Reply Quote 2
        • Ali HussainA Offline
          Ali Hussain
          last edited by

          Thank you much!

          1 Reply Last reply Reply Quote 0

          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