Community
    • Login

    Q: How to duplicate text with adding line between two certain words?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    8 Posts 4 Posters 1.5k 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.
    • Ziad AboramiZ
      Ziad Aborami
      last edited by

      Hello,
      I’am starter and I don’t have a lot experience.

      I have text file in this pattern:

      <span style=“color:darkblue”>some thing</span> some words

      <span style=“color:darkblue”>some thing else</span> another some words

      <span style=“color:darkblue”>some thing 1</span>another some words 1

      what I want to do:
      Duplcating the word between <span style=“color:darkblue”> and </span>
      then put it between <span class=“bold”> and </span>
      then put the duplicated result in the upper line

      <span class=“bold”>some thing</span>
      <span style=“color:darkblue”>some thing</span> some words

      <span class=“bold”>some thing else</span>
      <span style=“color:darkblue”>some thing else</span> another some words

      <span class=“bold”>some thing 1</span>
      <span style=“color:darkblue”>some thing 1</span>another some words 1

      That seems a little difficult
      Is that possible?

      Thanks in advance

      EkopalypseE 1 Reply Last reply Reply Quote 1
      • informagenieI
        informagenie
        last edited by

        What you want, You can do that easly with combinaison of ctrl+c and ctrl+v

        I don’t know what do you mean by duplicate…

        Meta ChuhM 1 Reply Last reply Reply Quote 0
        • EkopalypseE
          Ekopalypse @Ziad Aborami
          last edited by

          @Ziad-Aborami

          select regular expression mode in find/replace dialog.
          find what should be <span style="color:darkblue">(.+?)</span>
          and replace with would be <span class="bold">$1</span>\r\n$0

          Ziad AboramiZ 1 Reply Last reply Reply Quote 4
          • Ziad AboramiZ
            Ziad Aborami @Ekopalypse
            last edited by

            @Ekopalypse Thanks very much!

            That works for me :)

            best wisches

            1 Reply Last reply Reply Quote 1
            • Meta ChuhM
              Meta Chuh moderator @informagenie
              last edited by Meta Chuh

              welcome to the notepad++ community, @informagenie

              What you want, You can do that easly with combinaison of ctrl+c and ctrl+v
              I don’t know what do you mean by duplicate…

              please do not respond to a thread, if you are not ready to give a valid or useful answer.

              1 Reply Last reply Reply Quote 2
              • Ziad AboramiZ
                Ziad Aborami
                last edited by

                <span class=“bold”>$1</span>\r\n$0
                that puts the result in the buttom line like this

                <span style=“color:darkblue”>some thing</span> some words
                <span class=“bold”>some thing</span>

                What I need is like this

                <span class=“bold”>some thing</span>
                <span style=“color:darkblue”>some thing</span> some words

                EkopalypseE 1 Reply Last reply Reply Quote 0
                • EkopalypseE
                  Ekopalypse @Ziad Aborami
                  last edited by

                  @Ziad-Aborami

                  not for me - I get the result like expected.

                  Ziad AboramiZ 1 Reply Last reply Reply Quote 3
                  • Ziad AboramiZ
                    Ziad Aborami @Ekopalypse
                    last edited by

                    @Ekopalypse Thanks for help
                    It works now,
                    I have made a mistake

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