Community
    • Login

    Replace the comma between two selected words using regex replacement

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 1.3k 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.
    • voska7V Offline
      voska7
      last edited by

      I want to replace the comma (,) between two selected words. here is the input

      test normal content [ABC]new, ball, test[/ABC]
      

      output

      test normal content [ABC]new[/ABC][ABC] ball[/ABC][ABC] test[/ABC]
      

      can someone please guide me on how to do it?

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @voska7
        last edited by

        @voska7

        If you know about the existence of regex, why is this hard?

        Find: ,
        Replace: [/ABC][ABC]
        Search mode: Regular expression

        voska7V 1 Reply Last reply Reply Quote 0
        • voska7V Offline
          voska7 @Alan Kilborn
          last edited by

          @Alan-Kilborn i want to replace comma only inside [ABC] [/ABC]. I could not able to edit the first post.

          input
          test, normal content [ABC]new, ball, test[/ABC]

          Output
          test, normal content [ABC]new[/ABC][ABC] ball[/ABC][ABC] test[/ABC]

          sorry I did not explain properly in my first post.

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA Offline
            Alan Kilborn @voska7
            last edited by

            @voska7 said in Replace the comma between two selected words using regex replacement:

            i want to replace comma only inside [ABC] [/ABC]

            If you go to the FAQ on this site…
            And from there go HERE…
            One of the choices there will take you HERE…which seems to be what you need.

            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