Community
    • Login

    Find and Replace

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 2.5k 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.
    • Kishor VK Offline
      Kishor V
      last edited by

      1
      2. for example
      3 y
      4

      I want find and replace to give output like this

      1
      2. for example y
      3
      4

      1 Reply Last reply Reply Quote 0
      • guy038G Offline
        guy038
        last edited by guy038

        Hello Kishor V

        Basically, this kind of operation can be easily achieved with a search/replacement, in extended or regular expression mode

        For instance, starting with the list below :

        Family Name :
        Adams
        First Name :
        Paul
        Age :
        17
        Secondary School :
        St Andrews College
        

        You would obtain, after the S/R :

        Family Name : Adams
        First Name : Paul
        Age : 17
        Secondary School : St Andrews College
        

        Do you expect this behaviour ?

        If so, after opening the Replace dialog ( CTRL +H ) :

        A) If you check the Regular expression radio button :

        Find what :           :\R
        
        Replace with :        :
        

        Notes :

        • In the Replace zone, the colon is followed with a single SPACE

        • The \R syntax, means ( among other things ! ) any End of Line character ( \r\n with a Windows format, \n with an Unix/OSX format or \r with an old MAC format )

        B) If you check the Extended (\n, \r, \t, \0, \x…) radio button :

        Find what :           :\r\n        ( WINDOWS file format )
        
        Replace with :        :
        

        Notes :

        • In the Replace zone, the colon is followed with a single SPACE

        • If you currently use other file format than Windows, just write the right End of Line character, in the Find what zone

        Best Regards,

        guy038

        1 Reply Last reply Reply Quote 0

        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