• Login
Community
  • Login

How to Find all comma and replace it with a Hard Return (HRT)

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 2 Posters 569 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.
  • R
    Robert Long 0
    last edited by Mar 31, 2020, 3:49 PM

    Hi,
    I have a single line txt file with

    Robert Long robert.long@xxxx.com , Michael Long m.long@xxxx.com , . . . .

    What I want to do is have a hard return at each comma (removing the comma if possible)

    Thank you

    1 Reply Last reply Reply Quote 0
    • P
      PeterJones
      last edited by Mar 31, 2020, 3:50 PM

      • FIND = “,\h*”
      • REPLACE = “\r\n”
      • Search Mode = regular expression
      • REPLACE ALL

      ----

      Do you want regex search/replace help? Then please be patient and polite, show some effort, and be willing to learn; answer questions and requests for clarification that are made of you. All example text should be marked as plain text using the </> toolbar button or manual Markdown syntax; screenshots can be pasted from the clipbpard to your post using Ctrl+V. Show the data you have and the text you want to get from that data; include examples of things that should match and be transformed, and things that don’t match and should be left alone; show edge cases and make sure you examples are as varied as your real data. Show the regex you already tried, and why you thought it should work; tell us what’s wrong with what you do get… Read the official NPP Searching / Regex docs and the forum’s Regular Expression FAQ. If you follow these guidelines, you’re much more likely to get helpful replies that solve your problem in the shortest number of tries.

      R 1 Reply Last reply Mar 31, 2020, 3:57 PM Reply Quote 3
      • R
        Robert Long 0
        last edited by Mar 31, 2020, 3:53 PM

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • R
          Robert Long 0 @PeterJones
          last edited by Mar 31, 2020, 3:57 PM

          @PeterJones Awesome! Thank you
          I forgot to do Regular Expression

          Thank you for the quick reply

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