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
Notepad  : The Value of a Free Text EditorNotepad : The Value of a Free Text EditorApr 14, 2025 am 12:06 AM

Notepad is a free and powerful text editor for Windows platforms. Its advantages include: 1. Supports syntax highlighting and code folding in multiple programming languages; 2. Enhanced functions of plug-in systems and flexible configuration options; 3. Optimized performance of multi-threading technology and memory management; 4. Improved work efficiency; 5. Excellent performance when processing large files.

Notepad  : Its Origins and DevelopmentNotepad : Its Origins and DevelopmentApr 13, 2025 am 12:05 AM

Notepad wascreatedbyDonHoin2003toaddresstheneedforamoreefficienttexteditor.1)DonHo,aTaiwaneseprogrammer,releasedthefirstversionin2003.2)Itsopen-sourcenaturehasallowedforcollaborativedevelopmentandcontinuousimprovement.3)Notepad offersextensibilityt

Easy Installation: How to Get Notepad   Up and RunningEasy Installation: How to Get Notepad Up and RunningApr 12, 2025 am 12:01 AM

Notepad is a free source code editor that supports syntax highlighting and code folding in multiple programming languages. Installation steps: 1. Visit the official website to download the latest version; 2. Double-click the installation package and follow the prompts to install; 3. Start Notepad from the Start menu. Usage tips: 1. Select the corresponding language for syntax highlighting; 2. Install plug-ins such as "Compare" for file comparison; 3. Adjust the encoding format to solve display problems; 4. Turn off automatic completion and clean up plug-ins to optimize performance; 5. Enable automatic backup function to protect the code.

Notepad  : Donations and FundingNotepad : Donations and FundingApr 11, 2025 pm 12:13 PM

Notepad remains free and open source through user donations. 1) Donations are made through PayPal or bank transfer, and the user voluntarily decides the amount. 2) Funds are used for server fees, development tools and developer bonuses, and transparency is guaranteed through periodic reports. 3) Donations not only support Notepad, but also support the development of the entire open source community.

Notepad Line Numbers: Display Line NumbersNotepad Line Numbers: Display Line NumbersApr 10, 2025 am 09:42 AM

The steps to display line numbers in Notepad are: 1. Settings -> Preferences -> Editor -> Check "Show Line Number". Line numbering is crucial for programmers because it helps quickly locate and reference specific locations in code and improves productivity.

Notepad vs. Notepad  : Which Text Editor is Right for You?Notepad vs. Notepad : Which Text Editor is Right for You?Apr 09, 2025 am 12:09 AM

Choose Notepad because it is more powerful and suitable for programming and advanced text editing. 1. Notepad is suitable for simple text editing, lightweight and fast. 2.Notepad supports multiple programming languages, provides syntax highlighting and plug-in extensions, suitable for complex programming tasks.

Open Large Files in Notepad: Strategies for Handling Big Text FilesOpen Large Files in Notepad: Strategies for Handling Big Text FilesApr 08, 2025 am 12:07 AM

When processing large files, you should use Notepad, command-line tools, or custom scripts. 1.Notepad supports file chunked loading to reduce memory usage. 2. Command line tools such as less or more read files in stream mode. 3. Custom scripts use Python's itertools module to read files iteratively to avoid loading all content at once.

Notepad Auto Save: Workarounds and Alternatives for Auto-SavingNotepad Auto Save: Workarounds and Alternatives for Auto-SavingApr 07, 2025 am 12:03 AM

Notepad does not have built-in autosave function, but can be implemented through scripts or alternative tools. 1. Save Notepad every 5 minutes using PowerShell script. 2. Configure Notepad to enable automatic save. 3. Use VSCode and install the AutoSave plug-in, and set the autosave delay to 10 seconds. Through these methods, data loss can be effectively avoided.

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment