Skip to content

Everything for WordPress, web development — and beyond

💡 Useful Notepad++ tips: regex, hotkeys and automatic text cleanup in 2026

💡 Useful Notepad++ tips: regex, hotkeys and automatic text cleanup in 2026

You opened a five-thousand-line log and spent an hour removing duplicates by hand. Or you pasted text from Word into WordPress and ended up with double line breaks throughout the document. Notepad++ eliminates both scenarios in a single pass, but only if you know three or four specific techniques.

Most users stop at basic Ctrl + F. Meanwhile, the built-in regular expressions engine from Boost turns the editor into a batch text processing tool. Below you will find a regex cheat sheet, more than thirty keyboard shortcuts, and step-by-step instructions you can apply right now.

Applicable to Notepad++ version 8.9.6.4, June 2026.

💡 Quick overview:

  • Three search modes compared in a table: normal, extended, and regular expressions

  • Four regex symbol tables: basic, character classes, quantifiers, and grouping

  • Three real-world find-and-replace scenarios: HTML tags, markdown links, URL extraction

  • More than thirty keyboard shortcuts in four groups plus step-by-step instructions for cleaning text from Word

Three search modes: what to use and when

Notepad++ has three search modes. You switch between them at the bottom of the Ctrl + F and Ctrl + H dialogs in the "Search Mode" group. Confusing the modes means getting zero matches where there should be a hundred.

Mode

What it supports

When to use

Normal

Exact text

Searching for a word or phrase without special characters

Extended

\n \t \r \0

Replacing line breaks, tabs, null characters

Regular expressions

Full Boost syntax

Patterns, character classes, quantifiers, grouping

Extended mode is a quick way to replace line breaks with spaces without regex. If you need grouping or character classes, switch to full mode.

Regular expressions: an everyday cheat sheet

Regular expression mode is enabled in the search (Ctrl + F) or replace (Ctrl + H) dialog: at the bottom of the window, toggle "Search Mode" to "Regular expressions." After that, special characters work as operators rather than plain text.

Notepad++ search dialog with regular expression mode enabled

The Boost engine is compatible with VS Code, Sublime, and Vim syntax. Learn a pattern here and use it everywhere.

Basic symbols:

Symbol

What it matches

.

Any single character except a line break

^

Start of line

$

End of line

\d

Any digit (equivalent to [0-9])

\D

Any character except a digit

\w

Letter, digit, or underscore (equivalent to [a-zA-Z0-9_])

\W

Any character except \w

\s

Whitespace character: space, tab, line break

\S

Non-whitespace character

\n

Newline character (LF)

\r

Carriage return (CR)

Character classes:

Construct

What it matches

[abc]

Any of the listed characters

[a-z]

Any lowercase Latin letter

[A-Z]

Any uppercase Latin letter

[a-zA-Z]

Latin letter in any case

[0-9]

Any digit (equivalent to \d)

[^abc]

Any character except a, b, c

Quantifiers:

Symbol

How many times

*

Zero or more repetitions

+

One or more repetitions

.*

Any set of characters within a line

.+

Any non-empty string

Boundaries and grouping:

Construct

What it does

\b

Word boundary

\B

Not a word boundary

()

Grouping: contents available in replacement as \1, \2

\|

Logical "or"

Four patterns worth keeping in memory:

  • ^$, an empty line (start followed immediately by end)
  • ^\s*$, a line containing only whitespace characters
  • ^.*$, the entire contents of a line from start to end
  • \r\n, an empty line in Windows format (CRLF)

Find and replace: three real-world scenarios

Theory without practice does not stick. Here are three tasks from actual work with code and WordPress content.

Removing HTML tags while preserving text

You exported content from an old CMS and got a mess of tags. You need to strip the formatting and leave only plain text. In regular expression mode:

1Find: <[^>]*>
2Replace: (leave empty)

The pattern <[^>]*> finds everything between < and >: opening tags, closing tags, self-closing tags like <br/>. Leave the replacement field empty. The HTML disappears; the text remains untouched.

You have a list in [Title](url) format and need to keep only the titles. Two passes in regex mode.

Step 1. Remove the link portion along with the opening parenthesis:

1Find: \(https?://[^)]*\)
2Replace: (leave empty)

Step 2. Remove the square brackets. Switch to normal mode: search for [, replace with empty; then ], also replace with empty.

A hundred links become a clean list of titles in two operations.

Extracting URLs from a markdown list

The reverse task: from [Title](https://example.com) you need to keep only the address. One pass in regex mode:

1Find: ^[^(]*\(([^)]+)\).*$
2Replace: \1

The construct ([^)]+) captures the URL inside the parentheses. \1 inserts it in the replacement field; all other text in the line is discarded.

Keyboard shortcuts: working without a mouse

A set of combinations that saves time during daily work with code and content. Bookmark this page as a reference.

Working with files and tabs:

Action

Keys

Open document

Ctrl + O

New tab

Ctrl + N

Close tab

Ctrl + W

Save

Ctrl + S

Save as

Ctrl + Alt + S

Save all

Ctrl + Shift + S

Next document

Ctrl + Tab

Previous document

Ctrl + Shift + Tab

Basic editing:

Action

Keys

Select all

Ctrl + A

Copy

Ctrl + C

Cut

Ctrl + X

Paste

Ctrl + V

Undo

Ctrl + Z

Redo

Ctrl + Y

Duplicate line or selected text

Ctrl + D

Go to beginning of document

Ctrl + Home

Go to end of document

Ctrl + End

Go to beginning of line

Home

Go to end of line

End

Find and replace:

Action

Keys

Find in text

Ctrl + F

Replace text

Ctrl + H

Find in files

Ctrl + Shift + F

Find next

F3

Find previous

Shift + F3

Find selected next

Ctrl + F3

Find selected previous

Ctrl + Shift + F3

Go to line

Ctrl + G

Special operations:

Action

Keys

Convert to lowercase

Ctrl + U

Convert to UPPERCASE

Ctrl + Shift + U

Comment out selection

Ctrl + Shift + Q

Uncomment selection

Ctrl + Shift + K

Show tag or keyword list

Ctrl + Space

Bookmark line

Ctrl + F2

Jump to next bookmark

F2

Jump to previous bookmark

Shift + F2

Indent text right

Tab

Indent text left

Shift + Tab

Full-screen mode with tabs

F11

Full-screen mode without panels

F12

Zoom text area

Ctrl + mouse wheel

Moving blocks without copy-paste deserves special attention. Hold Ctrl + Shift and use the / keys to move a selected block within the document. The clipboard is not affected. The risk of accidentally overwriting an important fragment is zero.

Step-by-step instructions: removing blank lines after pasting from Word

You copied text from Microsoft Word, pasted it into WordPress, and got double and triple line breaks. Instead of manual cleanup, a built-in Notepad++ operation handles this in three steps.

Step 1. Open the problematic document. The blank lines are immediately visible.

Document with blank lines before processing in Notepad++

Step 2. Select all contents: Ctrl + A.

Selecting all text in Notepad++ before removing blank lines

Step 3. In the main menu: Edit → Line Operations → Remove Blank Lines.

Edit menu, Line Operations, Remove Blank Lines in Notepad++

Done. The blank lines disappear, and the text is ready to paste into WordPress without extra <br> tags and empty <p></p> elements. This technique also works for pastes from Google Docs. It saves dozens of minutes when working with long documents.

Commenting code: two shortcuts for the entire cycle

For a WordPress developer who edits functions.php, CSS, or JavaScript daily, commenting code is a constant part of the workflow. Two shortcuts cover the entire cycle:

  • Ctrl + Shift + Q, comment out the selected block. Notepad++ automatically inserts the correct syntax based on file type: // for PHP and JavaScript, /* */ for CSS.
  • Ctrl + Shift + K, uncomment a previously commented block.

Works for both single lines and multi-line blocks. The language is determined automatically by the file extension. No need to remember where to use double slashes versus asterisks.

Video: basic techniques in 5 minutes

For those who absorb visual formats better than text, here is a short introduction to key editor capabilities:

After watching, the keyboard shortcuts and regex patterns from the cheat sheet above will fit into a clear foundation.

⁉️🤔 Frequently asked questions

How do I enable regular expression mode in Notepad++?

Open the search (Ctrl + F) or replace (Ctrl + H) dialog. At the bottom of the window, find the "Search Mode" group of radio buttons and select "Regular expressions." After that, all special characters work as Boost operators. No additional settings are required.

Why doesn't the pattern \n find line breaks?

Most likely, the file uses Windows line endings: CRLF rather than LF. Try the pattern \r\n or the universal \R (line break in Boost). The current format is visible in the Notepad++ status bar: "Windows (CR LF)," "Unix (LF)," or "Macintosh (CR)."

What is the difference between extended search mode and regular expressions?

Extended mode understands only escape sequences: newline, tab, carriage return. Quantifiers, character classes, and grouping are available only in "Regular expressions" mode. Extended mode is enough for replacing line breaks with spaces. For removing tags or extracting data, you need full regex.

Can I search and replace across multiple files at once?

Yes: Ctrl + Shift + F opens the "Find in Files" dialog. Specify a folder, file mask (*.php, *.css), and search pattern. Notepad++ will go through all matching files and display results in a separate panel. For mass replacement, use the "Replace in Files" tab. Before running, always make a backup copy of the folder.

How do I delete lines containing a specific word?

In regular expression mode: in the "Find" field, enter ^.*keyword.*\R, and leave the "Replace" field empty. The \R construct captures the line break along with the line text so no empty space remains where the deleted line was. Works for any text pattern.

What to bookmark and where to start

Regular expressions mastered in Notepad++ work everywhere. The same syntax applies in VS Code, in PHP code (preg_match), in JavaScript, and in SQL queries. This is not a feature of one editor. It is basic developer literacy.

  • If you work with WordPress content: start with the blank line cleanup following the instructions above. You will see results in a minute.
  • If you process exports from an old CMS: the pattern <[^>]*> for removing HTML tags handles most typical tasks in a single pass.
  • If you are preparing data after a domain migration: Ctrl + H in regex mode for URL normalization replaces hours of manual work with one run.

Download Notepad++ for free from the official website and test these techniques on your first problematic file. Which scenario from this breakdown do you encounter most often? Let us know in the comments.