Before proceeding to the next step, let's take a quick look at the basic terms of regular expressions.Capture:When you use a subexpression to match the results of a regular expression. The Capture and CaptureCollection classes indicate the results
The Join method is implemented through wait (note: The method provided by the Object ). When the main thread calls t. during the join operation, the main thread will get the t lock of the thread object (wait means to get the lock of the object),
1. You can use "+" to connect characters. 2. you can use the append method of stringBuffer to directly add characters to the end. you can use the above two methods to write the Join method that meets your requirements. import java. util. hashMap;
When creating websites, especially various e-commerce websites, we first ask users to fill in some forms to obtain various information about registered users, because users may enter various types of information, some non-conforming data may cause
0: Basics of Regular Expressions
^ First line ID
$ End or end of an article
. Represents any character
? Indicates the occurrence of a forward character.
* Indicates the occurrence of 0 or multiple prefix characters.
[1-9] indicates a string of 1 to
Password
Time Limit: 2000/1000 MS (Java/others) memory limit: 65536/32768 K (Java/Others)Total submission (s): 23180 accepted submission (s): 9260Problem description a word is circulating on the Internet: "I often go online, so I can't get a knife ~
Regular expressions, referred to as regex, are descriptive methods of text patterns. For example, \d is a regular expression that represents a numeric character, that is, any number from 0 to 9.Use stepsThe functions of all regular expressions in
Find (locate because of the need to update the database, so not very common) is a very powerful Linux file Search command, with the following characteristics.1. Real-time, new files can be found immediately2. Precise3. Support many search criteria,
File Lookup:Locate, non-real-time lookup, search in the temporary database, fuzzy matching. [[Email protected] ~]# Locate passwd Find out if the current system has passwd this fileUpdatede manually generating a staging databaseAdvantages: Fast speed
Find related commands on Linux systems:
Which viewing the location of an executable file
Whereis viewing the location of a file
Locate to view file locations with a database
Find actual search hard disk query file name
File Lookup:Locate:non-real-time, fuzzy matching, lookup is based on the system-wide file database;# UpdateDB, manually generate the file databaseFast Speed Find:Real TimePrecisesupport for many search criteriatraverse all files in the specified
Linux Tenth Day: (August 15) file lookup and compressionLocate non-real-time lookup (database lookup)/var/lib/mlocate/mlocate.dbLocate-i performing a case-sensitive searchLocate-n N lists only the first n matching itemsLocate Foo search for a file
File Lookup:Locate: Non-real-time lookup, fuzzy matching, search according to the whole system file database, fastUpdateDB: Manually generating a file databaseFind: Real-time, accurate, support for many search criteria, traverse all files in the
Vim EditorText editor, word processorAsciiNano, SEDVi:visual InterfaceVim:vi improvedFull screen editor, modal editorVim mode:Edit mode (Command mode)Input modeLast-line modeMode conversion:Edit--Input:I: In front of the character of the current
The core idea of Linux is " all documents ", all the devices, system configuration, etc. are stored in file form, can find the file accurately, can modify the file, and so on, so the file search, lookup for the maintenance and management of the
First, the basic knowledge of regular expressions
1.1 Period Symbol
Suppose you are playing English Scrabble and want to find three-letter words, and the words must start with a "T" letter and
LocateNon-real-time, non-accurate lookups are based on a system-wide file databaseThe advantage is that speed is fastDatabase can be updated immediately using UpdateDBFindReal-time precision, support multi-search criteria, use traversal files to
Text lookup: grep egrep fgrepFile Lookup: Locate, findThe difference between locate and findLocate has a self-maintained database (Linux self-built, associated with all files), Linux will periodically update it every day, and locate in this database
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.