Community
    • Login

    remove the crlf at the end of lines that end with a specific character

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 2.2k 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.
    • Tom MoulderT
      Tom Moulder
      last edited by

      i have a text file with data spread across too many lines. at the end of the line – preceding the crlf – is always a “)” character. is there a way to create a replace command that will leave the “)” in place and replace the crlf with a blank space?

      1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones
        last edited by PeterJones

        Find what : \)\R = find literal parenthesis followed by newline sequence
        Replace with : \)\x20 = replace with literal parenthesis followed by a space (character 0x20)
        Search Mode : ☑ Regular Expression


        P.S. :
        (paraphrasing @guy038, the forum’s regex guru, who compiled these great regex resources, but hasn’t shared them in this thread yet):

        Here is a good starting point for NPP users unfamiliar with regular expression concepts and syntax:

        • http://docs.notepad-plus-plus.org/index.php/Regular_Expressions

        Modern Notepad++ (since v6.0) uses the Boost C++ Regex library, v1.55.0 (similar to the Perl Regular Common Expressions (PRCE), v5.8):

        • search syntax: http://www.boost.org/doc/libs/1_55_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html
        • replace syntax: http://www.boost.org/doc/libs/1_55_0/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html

        Other sites with valuable regular expression information include:

        • http://perldoc.perl.org/perlre.html
        • http://www.regular-expressions.info
        • http://www.rexegg.com
        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors