Community
    • Login

    Remove Unwanted Space & empty line and merge into single line with grouping.

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 2.9k 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.
    • Srinivasan k.d.S Offline
      Srinivasan k.d.
      last edited by

      Hello, I need your help to sort out below issue. Actually We have data like these in our file and it should be changed to actual one. Please refer below .

      Current -> Line 1
      Srini
      Vasan

      Line 2

      Sachin
      Tendulkar

      Actual:
      Srini Vasan
      Sachin Tendulkar

      I experimented for remove blank line and merge into single line. but i need line 1 & line 2 separately. Please share your thoughts if anyone knows. Thanks

      dr ramaanandD 1 Reply Last reply Reply Quote 0
      • dr ramaanandD Offline
        dr ramaanand @Srinivasan k.d.
        last edited by dr ramaanand

        @Srinivasan-k-d Simple, type Srini\RVasan in the Find what field and Srini Vasan in the Replace with field, tick the Regular expression mode and hit Replace, you will get Srini Vasan. Then, type Sachin\RTendulkar in the Find what field and Sachin Tendulkar in the Replace with field, tick the Regular expression mode and hit Replace, you will get Sachin Tendulkar. If there are some white spaces in between Srini and Vasan and Sachin and Tendulkar, use \s* instead of \R. Then, press ctrl + h (Shortcut for replace). Then, in the Find what zone, type ^\R ( for empty lines only) or ^\h*\R ( for empty lines with blank spaces only) and leave the Replace with zone empty. Then, tick the Wrap around option. Then, select the Regular expression search mode. Then, click on the Replace All button and all the blank lines will be removed.

        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