-: Common wildcards:*? []
*: Match any character of any length
? : Match any character
[]: Match any single character in the specified range
[^]: Delimiters, indicating inverse.
Ii. Regular Expression: Is a search and string replacement operation.
The general North American phone number format is:
999-999-9999
Or 999x999x9999 (X represents any character)
Match with character groups:
[0-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]
Abbreviated character
P ("\ n \ r \ t ". matches ("\ s {4}"); // true white space character \ s: [\ t \ n \ x0b \ f \ r] P ("". matches ("\ s"); // false indicates that \ s is not a blank character: [^ \ s], so it is false P ("a_8 ". matches ("\ W {3}"); // true P ("abc88
The regular expression object contains a regular expression pattern ). It uses the regular expression mode
Matches or replaces the properties and methods of a specific character (or character set combination) in a string ).
Regular Expression
ArticleSource: msdn. NET Framework class library RegEx class http://msdn.microsoft.com/zh-cn/library/system.text.regularexpressions.regex
Static and instance methods
Execute Regular Expression operations
Example
1. Use regular
When it comes to regular expressions, I believe many people will not be unfamiliar, and many times we have used them, such as verifying the correctness of email addresses or mobile phone numbers. NET provides a powerful regular expression helper
Use metacharactersMatching number:\ D[0-9]\ D[^ 0-9]Match letters and numbers\ W[0-9a-zA-Z _] Note: underlines are included.\ W[^ 0-9a-zA-Z _]Match blank characters\ SAny blank character [\ f \ n \ r \ t \ v]\ SAny non-blank character [^ \ f \ n \ r
A regular expression is an object that describes the character mode.The Regexp object and string object in Javascript define a method that uses regular expressions to execute powerful pattern matching and text retrieval and replacement
In SQL query statements, regular expressions are sometimes required to specify the mode for their complex search. Some Regexp applications (not all) in MySQL statements are given below ):
1) ^
Match the start part of the string.
mysql> SELECT
SED basic usage:Sed:sTreamEdItorLine Editor (full screen Editor: VI)SED: Mode spaceBy default, the original file is not edited, only the data in the pattern space is processed, and after the processing is finished, the pattern space is printed to
Text Editor:Line Editor: SEDFull Screen Editor: Nano,vi,vimVim Program EditorVim can be considered an advanced version of VIVi:visual Interface Full Screen text editorVIM:VI improved improved full-screen text editorVim Tutorial:VimtutorModal
Vim How to useVim is a well-known, powerful, highly customizable text editor similar to VI, which improves and adds many features on the basis of VI.Learn about the three basic modes of VIM(1) General modeOpen a file with VI directly into the
Copy the/etc/grub.cfg configuration file to the/tmp directory and use the Find and replace command to delete the white space character at the beginning of the/tmp/grub.cfg file;650) this.width=650; "src="
Vim modeThe VIM mode is divided into edit mode (command mode), input mode, and last line mode.Mode to switch to each other:Input mode--edit mode: ESCEdit mode--and last-line mode::Last-line mode--edit mode: ESCEdit mode--Input mode:I:insert (enter
Notes on playing vim-(iii) In the blink of an eye, May will slip away from the fingers, do not give a little time to daydream, I want to hurry to grasp the tail of May, in the blog add a pen. Then let's go to vim for a while. Use Vim to draw a full
Linux Getting Started sed command caseActual combat:1, delete the/etc/grub.conf file in the beginning of the blank character;Sed-r ' [email protected]^[[:spapce:]][email protected]@g '/etc/grub.conf2. Replace the number in the "Id:3:initdefault:"
1, the Replication/etc/skel directory is/home/tuser1, requires/home/tuser1 and its internal files belong to the group and other users do not have any access rights.CP SRC DESTSRC is the directory: Use option at this time:-R if DEST does not exist:
1, the Replication/etc/skel directory is/home/tuser1, requires/home/tuser1 and its internal files belong to the group and other users do not have any access rights.650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/86/8D/wKioL1fDwTywtUifAAAp5
1, the Replication/etc/skel directory is/home/tuser1, requires/home/tuser1 and its internal files belong to the group and other users do not have any access rights.[Email protected] home]# cp-r/etc/skel//home/tuser1[Email protected] home]# chmod-r u-
quickexpr =/^ (?: [^) [^>]*$|# ([w-]+) $)/(?:...) Represents a non-capture type
[^
() is a catch type that starts with ' <> ' and contains one or more characters in the middle
$ indicates the end of a character
(# ([w-]+)) means a catch type,
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.