Search and replace text lines at same time possible?



  • Hello,

    it is possible to search and replace several lines in notepad++ with another text at the same time?
    With the normal search and replace function you can only replace 1 line. But
    i want replace several lines with other text at the same time.

    Example original text file:

    COMMENT 1

    BEGIN
    Here ist beautiful text
    And sometimes i need sleep
    END

    COMMENT 2

    BEGIN
    Here ist beautiful text
    And sometimes i need sleep
    END

    I want replace
    Here ist beautiful text
    And sometimes i need sleep

    with the text:
    Car
    House

    The new text file would be:

    COMMENT 1

    BEGIN
    Car
    House
    END

    COMMENT 2

    BEGIN
    Car
    House
    END

    Regards



  • Because the requirement of moderation of postings created by new members is still activated, this posting was lost in the Post Queue for 2 days. This comment is only for bumping it up in the list of recent postings.



  • @Melanie-Niedfeld

    It is possible by activating extended search mode and using escape sequences for line breaks (CrLf):

    1c9191f5-66bc-4387-8ee1-1c2bd2c68038-grafik.png


Log in to reply