search
HomeDevelopment ToolsnotepadDetailed explanation of the search function of notepad++

The following tutorial column will introduce you to the search function of notepad. I hope it will be helpful to friends who need it! Detailed explanation of the search function of notepad++notepad

Search function (regular expression)

We know that notepad is a very powerful editor, and I believe that it must be a must-have tool for students. It has very friendly support for text editing and viewing, and it also handles larger files very well. For example, the text format log generated during the operation of our system is usually a relatively large file. Generally, we can use notepad to quickly open the log file. However, for log files, various information from different places will be recorded, such as various services, various processes, various threads, various modules, etc. When we analyze log files, sometimes to quickly locate a problem or a problem with a related module, we need to use its search function. We need to match specific keywords to search for useful information and view relevant log content. Regarding the notepad search function, the shortcut key Ctrl F can directly bring up the search window.

When you see this, you will definitely think there is something to learn from this! Haha, yes, the above contents are common sense that everyone knows. However, as you can see from the picture above, notepad supports three search modes: Detailed explanation of the search function of notepad++

Normal mode

  • Extended mode
  • Regular expression mode
  • regular expression mode of notepad, like His name is the same. This mode supports regular expression search. Once we are familiar with the use of regular expressions, I believe you will fall in love with this feature of using notepad.

Commonly used expressions

Listed below are some commonly used regular expression matching symbols for the convenience of students to find and learn.

Match any character Matches the previous character 0 or more times, for example, Matches the preceding character 1 or more times, for example, Matches the preceding character 0 or 1 time, for example, Matches the previous character or group n times, for example, ##{m,n }ab{2,3}c^^ a$z$[][ab]##[^] Matches any single character except "a" and "b"\w\W\d\D##\b\B|\s\S\\\t\r\n \r\n
Characters Description
##.
* ab* matches "a", "ab" or "abb"
ab Matches "ab" or "abb", but not "a"
? ab? matches "a" or "ab", but not "abb"
{n} ab{2}c matches "abbc".
Matches the previous character or group, at least m times and at most n times (if n is empty, it means any number of times), for example, Matches "abbc" or "abbbc"
The expression on the right side matches the beginning of a line, for example, Matches lines starting with "a"
The expression on the left is matched at the end of a line, for example, Matches lines ending with "z"
Matches any single character in the list, such as , matches "a" or "b"; [0-9] matches any single number 0-9
Matches any single character outside the list, for example, [^ab]
matches a single character, including underscores, equivalent to [A-Za-z0-9_]
matches non-single characters, equivalent to [^A-Za-z0-9_]
matches numeric characters, equivalent to [0-9]
matches non-numeric characters, equivalent to [^0-9]
Matches a word boundary (beginning or end), for example, \bhe matches "hello" but not "ahello"
Matches non-word boundaries
or operator, matches the left or right expression The formula
matches the blank format
Match non-blank characters
Match characters\
Match Tab character
Match the carriage return symbol
Match the newline symbol
Match carriage return and line feed

Marking and grouping

The above symbols are for one character or for repeating one character, however, if What should I do if there are multiple characters? We need to use grouping. Regarding grouping, we can use parentheses () to specify the grouping expression. For example: (abc)? means matching 0 or 1 abc, here A parenthesized expression is a grouping. Grouping can be divided into two forms, capturing group and non-capturing group. Capturing groups can be numbered by counting their opening brackets from left to right; non-capturing groups are groups that begin with (?) and do not capture text.  

Non-capturing group – backward assertion. For example Non-capturing group – negative forward assertion. For example, the Non-capturing group – negative backward assertion . For example, Name the captured group. Submit a name to the group for subsequent use, for example Matches the group named name.Comment – ​​Content within brackets will be ignored when matching.
Character Description
(…) A group of captures. The first group can be accessed via \1, the second via \2.
(?:…) Non-capturing group.
(?=…) Non-capturing group – forward assertion. For example, (.*)(?=ton) expression, when encountering the 'Appleton' string, will match 'Apple' .
##(?(? Expression, when encountering the 'sir William' string, the match is 'William'.
(?!…) (?!e) expression, when encountering 'Apple', will find every letter except 'l', Because it follows 'e'.
(?(?, when encountering 'sir William', it will match 'William'.
(?P…) (?PA[^\s ] )\s(?P=first) will match 'Apple Apple'. Similar to (A[^\s] )\s\1, but using a group name instead of a number .
(?=name)
(?#comment)

Careful students will surely find that in addition to the search function supporting regular expressions, notepad's replacement function also supports regular expressions. The symbols above are also applicable to substitutions.

#

The above is the detailed content of Detailed explanation of the search function of notepad++. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:csdn. If there is any infringement, please contact admin@php.cn delete
Installing Notepad  : Quick and Simple StepsInstalling Notepad : Quick and Simple StepsMay 06, 2025 am 12:12 AM

Notepad installation is very simple and takes only a few minutes. 1. Visit the official website to download the appropriate version. 2. Open the download file and follow the prompts to install. 3. It can be used after installation. It not only supports multiple programming languages, but also extends functions through plug-ins, which is a must-have tool for programmers.

The Notepad   Installation Guide: Everything You Need to KnowThe Notepad Installation Guide: Everything You Need to KnowMay 05, 2025 am 12:15 AM

Notepad is a free open source text editor for programming and code editing. The installation steps include: 1. Visit the official website to download the latest version; 2. Double-click the installation file and complete the installation; 3. Start and perform basic configuration. Notepad supports multiple programming languages, with functions such as syntax highlighting, code folding, macro recording, etc., and can expand its functions through plug-ins.

Notepad  's Pricing Model: A Deep DiveNotepad 's Pricing Model: A Deep DiveMay 04, 2025 am 12:01 AM

Notepad adopts a completely free pricing model. 1) This model has attracted a large number of users, formed a huge community, and provided rich feedback and improvement suggestions. 2) Through user donations and corporate sponsorship, Notepad has achieved sustainable development, but unstable funding sources are a challenge it faces.

Installing and Using Notepad  : Your First StepsInstalling and Using Notepad : Your First StepsMay 03, 2025 am 12:01 AM

Notepad is a free Windows text editor that supports multiple programming languages. It is easy to install, just download and run the installer from the official website. Basic features include multi-tab editing, syntax highlighting, and code collapse. Examples of usage include opening and saving files, finding and replacing, and plug-in usage. Personalized settings and shortcut keys can optimize the user experience, and plug-ins can implement code backup and version control.

The History of Notepad   and its Country of OriginThe History of Notepad and its Country of OriginMay 02, 2025 am 12:07 AM

Notepad originatesfromVietnam,createdbyDonHoin2003.Itbeganasaresponsetotheneedforamorepowerful,free,andopen-sourcetexteditor,quicklygainingpopularityduetoitsperformance,usability,andcommunity-drivendevelopment.

Identifying Notepad  's Country of OriginIdentifying Notepad 's Country of OriginMay 01, 2025 am 12:17 AM

Notepad's origin is France. Its developer Donald Ho is French, and Notepad has become the preferred tool for developers around the world for its lightweight and powerful features, reflecting France's emphasis on knowledge sharing and innovation.

Notepad  's Roots: Unveiling Its National IdentityNotepad 's Roots: Unveiling Its National IdentityApr 30, 2025 am 12:09 AM

Notepad was founded by the Frenchman Don Ho and has a distinct French imprint. 1.DonHo developed Notepad in 2003, aiming to replace Windows Notepad and support multiple programming languages. 2. Its official website and icon design reflect the French cultural characteristics. 3. Users can customize through plug-ins, such as NppFTP, but they need to pay attention to performance optimization, such as cleaning up plug-ins and using multi-document interfaces reasonably.

Getting Started: Installing Notepad   for BeginnersGetting Started: Installing Notepad for BeginnersApr 29, 2025 am 12:25 AM

The steps for installing and initial use of Notepad are as follows: 1) Visit notepad-plus-plus.org to download the appropriate version; 2) Double-click the installation file and install it as prompts; 3) Start Notepad, create a new file and enter text; 4) Save the file and select the file type; 5) Write and run a simple Python program, such as print("Hello,Notepad !"). Through these steps, you can start programming with Notepad smoothly.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.