Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 49029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:22:21+00:00 2026-05-10T16:22:21+00:00

How can I find/replace all CR/LF characters in Notepad++? I am looking for something

  • 0

How can I find/replace all CR/LF characters in Notepad++?

I am looking for something equivalent to the ^p special character in Microsoft Word.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T16:22:22+00:00Added an answer on May 10, 2026 at 4:22 pm

    [\r\n]+ should work too

    Update March, 26th, 2012, release date of Notepad++ 6.0:

    OMG, it actually does work now!!!

    PCRE regexp in Notepad++


    Original answer 2008 (Notepad++ 4.x) – 2009-2010-2011 (Notepad++ 5.x)

    Actually, no, it does not seem to work with regexp…

    But if you have Notepad++ 5.x, you can use the ‘extended‘ search mode and look for \r\n. That does find all your CRLF.

    (I realize this is the same answer as the others, but again, ‘extended mode’ is only available with Notepad++ 4.9, 5.x and more)


    Since April 2009, you have a wiki article on the Notepad++ site on this topic:
    "How To Replace Line Ends, thus changing the line layout".

    Some relevant extracts include the following search processes:

    Simple search (Ctrl+F), Search Mode = Normal

    You can select an EOL in the editing window.

    • Just move the cursor to the end of the line, and type Shift+Right Arrow.
    • or, to select EOL with the mouse, start just at the line end and drag to the start of the next line; dragging to the right of the EOL won’t work. You can manually copy the EOL and paste it into the field for Unix files (LF-only).

    Simple search (Ctrl+F), Search Mode = Extended

    The "Extended" option shows \n and \r as characters that could be matched.
    As with the Normal search mode, Notepad++ is looking for the exact character.
    Searching for \r in a UNIX-format file will not find anything, but searching for \n will. Similarly, a Macintosh-format file will contain \r but not \n.

    Simple search (Ctrl+F), Search Mode = Regular expression

    Regular expressions use the characters ^ and $ to anchor the match string to the beginning or end of the line. For instance, searching for return;$ will find occurrences of "return;" that occur with no subsequent text on that same line. The anchor characters work identically in all file formats.
    The ‘.’ dot metacharacter does not match line endings.

    [Tested in Notepad++ 5.8.5]: a regular expression search with an explicit \r or \n does not work (contrary to the Scintilla documentation).
    Neither does a search on an explicit (pasted) LF, or on the (invisible) EOL characters placed in the field when an EOL is selected. Advanced search (Ctrl+R) without regexp

    Ctrl+M will insert something that matches newlines. They will be replaced by the replace string.
    I recommend this method as the most reliable, unless you really need to use regexp.
    As an example, to remove every second newline in a double-spaced file, enter Ctrl+M twice in the search string box, and once in the replace string box.

    Advanced search (Ctrl+R) with Regexp.

    Neither Ctrl+M, $ nor \r\n are matched.


    The same wiki also mentions the Hex editor alternative:

    • Type the new string at the beginning of the document.
    • Then select to view the document in hex mode.
    • Select one of the new lines and hit Ctrl+H.
    • While you have the Replace dialog box up, select on the background the new replacement string and Ctrl+C copy it to paste it in the Replace with text input.
    • Then Replace or Replace All as you wish.

    Note: the character selected for new line usually appears as 0a.
    It may have a different value if the file is in Windows Format. In that case, you can always go to Edit -> EOL Conversion -> Convert to Unix Format, and after the replacement switch it back and Edit -> EOL Conversion -> Convert to Windows Format.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 86k
  • Answers 86k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer ASCII is inherently a 7-bit character set, so what you… May 11, 2026 at 5:18 pm
  • Editorial Team
    Editorial Team added an answer What about an encoding that only uses "safe" characters like… May 11, 2026 at 5:18 pm
  • Editorial Team
    Editorial Team added an answer Jquery (or other libraries??) will basically do all this for… May 11, 2026 at 5:18 pm

Related Questions

How can I parse text and find all instances of hyperlinks with a string?
I'm trying to find a way to replace all instances of a string token
I suspect this has already been answered somewhere, but I can't find it, so...
Quick question, If I want to document some code on a basic HTML and

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.