Community
    • Login

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

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    8 Posts 4 Posters 2.1k 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.
    • Ziad AboramiZ Offline
      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 Offline
        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 Offline
          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 Offline
            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 Offline
              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 Offline
                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 Offline
                  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 Offline
                    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

                    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