Find and Replace



  • 1
    2. for example
    3 y
    4

    I want find and replace to give output like this

    1
    2. for example y
    3
    4



  • 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


Log in to reply