Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How can I replace all lines with given text?

    Help wanted · · · – – – · · ·
    3
    3
    47
    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 III
      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 Kilborn PeterJones 2 Replies Last reply Reply Quote 0
      • Alan Kilborn
        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
        • PeterJones
          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
          Copyright © 2014 NodeBB Forums | Contributors