Community
    • Login

    How can I replace all lines with given text?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 338 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.
    • Luis Piña IIIL
      Luis Piña III
      last edited by

      I want a regex to do this and that text that needs replacing might start or end with punctuation.

      Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Luis Piña III
        last edited by

        @Luis-Piña-III

        It is good to want things.
        However, if you don’t put more effort into your description, you might not be on the receiving end of any advice.

        1 Reply Last reply Reply Quote 3
        • PeterJonesP
          PeterJones @Luis Piña III
          last edited by

          @Luis-Piña-III

          To replace an entire line, you will want to combine the regex concepts for “anchor to beginning of line” with “match 0 or more of any character” then “anchor to end of line”. The Online User Manual Searching/Regex section linked below will help you quickly find those concepts" (search for “anchor” and “any character” and “0 or more”)

          The replacement is just the text you want it to be replaced with.

          ----

          Useful References

          • Please Read Before Posting
          • Template for Search/Replace Questions
          • Formatting Forum Posts
          • Notepad++ Online User Manual: Searching/Regex
          • FAQ: Where to find other regular expressions (regex) documentation
          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors