Community
    • Login

    replace " by "

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    10 Posts 2 Posters 1.4k Views 1 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.
    • Pouemes44P Offline
      Pouemes44
      last edited by Pouemes44

      hello all
      i would to replace in my html file " by quot; but only in text content not inside script link etc…

      do you think it is possible
      thanks

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

        Hello, @pouemes44,

        As usual, could you provide some examples, using the </> NodeBB button ? I suppose that text zones, in HTML files, are defined by areas of text between two double-quotes ?

        And that you’re speaking about text zones "............".............." containing, inside, a single double-quote symbol which is to be replaced with the &quot; notation ?

        Best Regards,

        guy038

        P.S. :

        By the way, it is always surprising how many people tell you: “I want to do this with N++”, without giving any further explanation or text to think about !!

        1 Reply Last reply Reply Quote 3
        • Pouemes44P Offline
          Pouemes44
          last edited by

          hello guy

          the solution will be perhaps if it is possible to search and replace only inside two div where is my text
          <div class=“texte”>
          </div>
          and
          <div class=“txt”>
          </div>

          • in each page i can have more than only one <div class=“texte”></div> or <div class=“txt”></div>

          *the block <div class=“texte”></div> can be on the same line or not
          *the block <div class=“txt”></div> can be on the same line or not

          i can also have inside these div A tag with href=“…/textetxt.htm” title=“texttext”>
          so i need keep " when search find:
          ="
          .htm"
          ">

          the " to replace inside these two class can have or not for the first one a space before and for the second have or not a space after

          1 Reply Last reply Reply Quote 0
          • Pouemes44P Offline
            Pouemes44
            last edited by

            for the A tag inside those div perhaps the best will be to search them inside these div to control i think i havent to much, and perhaps its not always .htm" as end of the link

            1 Reply Last reply Reply Quote 0
            • Pouemes44P Offline
              Pouemes44
              last edited by Pouemes44

              @guy038 said in replace " by ":

              “…”…"

              yes text zones “…” “…” inside <div class=“texte”>
              </div>
              and
              <div class=“txt”>
              </div>
              replace " by &quot ;

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

                @pouemes44,

                Sorry, but, as I do not practice HTML, I cannot get a good idea of your needs, yet :-((

                • Please, when posting , use the </> NodeBB facility to insert raw text as it is !. When using that function, any text is changed, for instance, into :
                Please, when posting , use the **`</>`** **NodeBB** facility to insert **raw** text as it is !
                
                • Insert some text as it is, presently ( the initial text ), containing areas where the double-quotes have to be changed by &quot;

                • Insert the same text with the modifications that you exptect to ( The final text ), so containing some &quot; strings

                • Of course, you can show us more than one example, but always specifying the BEFORE text AND the AFTER text !

                • Give also examples, containing areas where the double-quotes must not be changed by &quot;

                Thanks for your cooperation !

                Best Regards,

                guy038

                1 Reply Last reply Reply Quote 1
                • Pouemes44P Offline
                  Pouemes44
                  last edited by Pouemes44

                  bonjour guy an example
                  betwee two stars the quotes i want to replace are inside div with class text and texte ( i cannot put link here so instead <a i have put <x)

                  before

                  <div class="texte"><p>ipsum dolor sit amet, **"**consectetur**"** adipiscing elit. Sed id erat erat.</p>
                  <p>Vestibulum ante faucibus <span lang="ar" dir="rtl">اختبار يوناني</span> posuere cubilia curae; Ut suscipit.</p>
                  <p>Maecenas ultrices porta mattis. Quisque dictum aliquet eros, non feugiat enim aliquet eget.</p></div>
                  <div class="txt"><p>Vivamus condimentum accumsan mi a ornare..</p>
                  <p>Etiam varius, felis efficitur auctor sagittis, eget consectetur **"**urna ipsum**"** eu elit...</p>
                  <p>Sed iaculis felis nunc, eu aliquet mi tempor in. Integer ultrices quis purus vel eleifend.</p></div>
                  <div class="txt"><p>Praesent <span lang="el">**"**ελληνική δοκιμή**"**</span>, ultrices, nec mattis **"**tortor aliquét**"**. Etiam eu turpis massa. **"**Quis euismod**"** non, porta.</p></div>
                  <div class="texte">
                  <p> ac eleifend dolor. Integer vitae mi sed purus **"**efficitur**"**dapibus.</p>
                  <p>**"**In nisl tellus**"**, egestas quis eleifend <x href="https://facilisis.com/semper.htm" title="semper serem" target="_blank" rel="noreferrer">semper</x> nibh. Aliquam pharetra..</p></div>
                  

                  after

                  <div class="texte"><p>ipsum dolor sit amet, **&quot;**consectetur**&quot;** adipiscing elit. Sed id erat erat.</p>
                  <p>Vestibulum ante faucibus <span lang="ar" dir="rtl">اختبار يوناني</span> posuere cubilia curae; Ut suscipit.</p>
                  <p>Maecenas ultrices porta mattis. Quisque dictum aliquet eros, non feugiat enim aliquet eget.</p></div>
                  <div class="txt"><p>Vivamus condimentum accumsan mi a ornare.</p>
                  <p>Etiam varius, felis efficitur auctor sagittis, eget consectetur **&quot;**urna ipsum**&quot;** eu elit...</p>
                  <p>Sed iaculis felis nunc, eu aliquet mi tempor in. Integer ultrices quis purus vel eleifend.</p></div>
                  <div class="txt"><p>Praesent <span lang="el">**&quot;**ελληνική δοκιμή**&quot;**</span>, ultrices, nec mattis **&quot;**tortor aliquét**&quot;**. Etiam eu turpis massa. **&quot;**Quis euismod**&quot;** non, porta.</p></div>
                  <div class="texte">
                  <p>Ac eleifend dolor. Integer vitae mi sed purus "**&quot;**efficitur**&quot;** dapibus.</p>
                  <p>**&quot;**In nisl tellus**&quot;**, egestas quis eleifend <x href="https://facilisis.com/semper.htm" title="semper serem" target="_blank" rel="noreferrer">semper</x> nibh. Aliquam pharetra..</p></div>
                  
                  1 Reply Last reply Reply Quote 0
                  • Pouemes44P Offline
                    Pouemes44
                    last edited by Pouemes44

                    in my pages the quotes i want to replace are always inside div with class=texte" and class=txt"

                    but
                    you see in this example, i have not only text inside my div
                    so i dont want to replace quotes for

                    class=“something”
                    lang=“something”
                    dir=“something”"
                    href=“something”
                    title=“something”
                    “_blank”
                    “noreferrer”
                    alt=“something”

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

                      Hi, @pouemes44,

                      Although, I stayed on-line, in our forum, I’m just back to my laptop. Sorry ! Thanks, for your example and clarifications on zones which must keep real " double-quotes !

                      Now, after a quick oversight in your raw text, I noticed that there are ONLY the **"** string which has to be changed into the string **&quot;**

                      Am I right about it ? If so, why not this simple S/R, in normal mode :

                      SEARCH **"**

                      REPLACE **&quot;**

                      Cheers,

                      guy038

                      1 Reply Last reply Reply Quote 1
                      • Pouemes44P Offline
                        Pouemes44
                        last edited by

                        hello Guy

                        Yes only these quotes (i dont succeed here to put in bold it give me these **)

                        if i do a normal S/R it will change all the quotes of my html page

                        is it possible with regex to S/R only inside a part of a page
                        in my example inside these two blocks when notepad++ find them

                        <div class=“texte”>
                        </div>
                        and
                        <div class=“txt”>
                        </div>

                        if it is possible it will be great for me even for others S/R i can do

                        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