Community
    • Login

    How do select multiple line and replace text?

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 4 Posters 6.0k 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.
    • Sharifuddin ShakilS
      Sharifuddin Shakil
      last edited by

      I want to select multiple lines text and I want to replace some text in the select area?

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Terry RT
        Terry R
        last edited by

        @Sharifuddin-Shakil said:

        select multiple lines text

        It can be done. May I suggest you read a previous posting:
        https://notepad-plus-plus.org/community/topic/17567/multi-line-find-and-replace
        where multiple lines of text are captured (searched on). The use of carriage return/line feeds enables that to be done, see “\r\n” in the search portion.

        Have a go and if you are still unsure it would be prudent to provide a sample of the text (assuming no confidential information divulged). In this case to provide samples that won’t be affected by the posting engine, please see the FAQ, in particular:
        https://notepad-plus-plus.org/community/topic/15739/faq-desk-request-for-help-without-sufficient-information-to-help-you

        Terry

        1 Reply Last reply Reply Quote 3
        • Alan KilbornA
          Alan Kilborn @Sharifuddin Shakil
          last edited by

          @Sharifuddin-Shakil said:

          I want to select multiple lines text and I want to replace some text in the select area?

          I would interpret this question more simply perhaps than @Terry-R did.

          How about:

          • Invoke the Replace dialog (via pressing ctrl+h)
          • Select your desired text to be searched back in the editor tab window
          • Move back to the Replace window and tick the checkbox for In Selection
          • Specify what you are searching for and what you are replacing it with, and any other options…
          • Press the Replace All button
          1 Reply Last reply Reply Quote 4
          • ajay gohilA
            ajay gohil
            last edited by

            Open Notepad++ and press Ctrl+F and then from the Find in Files tab options.

            Now you’ll…

            Put the string in the regex format of the Find What: ^.(PeopleSleptWith).$

            The string will go between the “()” parenthesis just as shown above in #1
            Put the 5 spaces and then the Replace with: PeopleSleptWith 7 string

            Put the Filters: as . or *.txt or whatever you are replacing file type wise
            Put the Directory: where you want it to be (the root folder)
            Check the Regular expression option
            Select Replace in Files
            Check the file(s) and all should be correct now

            Alan KilbornA 1 Reply Last reply Reply Quote -1
            • Alan KilbornA
              Alan Kilborn @ajay gohil
              last edited by

              @ajay-gohil

              How does THAT mess of a solution match the original problem??

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors