Community
    • Login

    Find and Replace

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 2.2k 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.
    • Kishor VK
      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
        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
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors