: Audit table by Scott;--(2). Audit User-executed SQL statements: Audit CREATE table by Scott;Audit Insert Table by u0007; ---- Audit INSERT into table or view; Audit Delete Table by u0007; ---- Audit deletes rows from a table or view; --(3). Specify the Audit method: Audit Delete Table by u0007 by access; ---- access mode, each statement is executed once t
C # Regular Expressions
A regular expression is a pattern that matches the input text. The. Net Framework provides a regular expression engine that allows this match. A pattern consists of one or more characters, operators, and structures.
Defining Regular Expressions
The following lists the various categories of characters, operators, and structures used to define regular expressions.
Character escapes
Character class
Anchor Point
Grouping constructs
Qualifier
Reverse reference Construction
Alt
Source: RegExLib.com Regular Expression Cheat Sheet (. NET)
Metacharacters
Description
^
Start position of matching string
$
End position of matching string
.
Match any single character (except line break \ n)
|
Alternate
{...}
Specify the quantity to limit
[...]
Character Set to be matched
(...)
Logical grouping of expressions
*
Matches zero or multiple previous expressions
Source: RegExLib.com Regular Expression Cheat Sheet (. NET)
Metacharacters
Description
^
Start position of matching string
$
End position of matching string
.
Match any single character (except line break \ n)
|
Alternate
{...}
Specify the quantity to limit
[...]
Character Set to be matched
(...)
Logical grouping of expressions
*
Matches zero or multiple previous expressions
Meaning of expression:
1. Character
x character X. For example a denotes character a
\ backslash character. Write as \\\\ in writing. (Note: Because Java in the first parsing, the \\\\ parsing into a regular expression \ \, in the second resolution, and then resolved to \, so usually not 1.1 of the escape characters enumerated, including 1.1 of \, and with the write two times)
\0n with octal value 0 of the character n (0 \0nn with octal value 0 of the character nn (0 \0mnn characters with octa
The construction summary of regular expressions
Construct match
Character
X character X\ backslash Character\0n with octal value 0 of the character n (0 \0nn with octal value 0 of the character nn (0 \0mnn characters with octal value 0 mnn (0 \XHH characters with hexadecimal value of 0x hh\uhhhh characters with hexadecimal value of 0x HHHH\ t tab (' \u0009 ')\ n New Line (newline) character (' \u000a ')\ r return character (' \u000d ')\f page feed (' \u000c ')\a Alarm (Bell) character (' \
) Character Description \a match a BELL, \u0007 \a match at the beginning of T He input. differs from ^ on that \a won't match after A New-line within the input. \b, outside of a [Set] Match if the current position is a word boundary. Boundaries occur at the transitions between word \w and Non-word \w, with characters combining. Also:rklunicodewordboundaries \b, within a [Set] Match a BACKSPACE, \u0008. \b Match If the current position isn't a word bo
\xhh characters with a hexadecimal value of 0x hh \uhhhh characters with a hexadecimal value of 0x hhhh \ t tab (' \u0009 ') \ nthe new line (newline) character (' \u000a ') \ r return character (' \u000d ') \f page Break (' \u000c ') \a Alarm (Bell) character (' \u0007 ') \e Escape character (' \u001b ') \cx the control character class corresponding to x [ABC] A, B, or C (Simple Class) [^ABC] Any character except A, B, or C (negation) [a-za-Z] A to
classes and their equivalent metacharacters.
Metacharacters
Equivalent character class
\
Matching ringtone alert); \ u0007
\ B
Match the word boundary outside the character class, which matches the unsigned character, \ u0008
\ T
Matched tab, \ u0009
\ R
Match carriage return, \ u000D
\ W
Match vertical tabs, \ u000B
\ F
Match the newline, \ u000C
\ N
Matc
= newRegex (@ "(\ w {2} | \ w {3} | \ w {4})", RegexOptions. Compiled | RegexOptions. IgnoreCase );MatchCollectionmc = reg. Matches (s );Foreach (Matchminmc)Console. WriteLine (m. Value );Console. ReadLine ();}
The output result is: 'th'' IN ''is'' as ''ne ''de ''ve ''lo'' 'pe'
Appendix
Escape Character
Description
General characters
Except. $ ^ {[(|) * +? \, Other characters match themselves.
\
It matches the Bell (Alarm) \
Regular Expressions (recommended in syntax) and regular expression syntax
Constructor of a regular expression
Construct matching
Character
X characters x\ Backslash character\ 0n CHARACTER n with an octal value of 0 (0 \ 0nn: nn (0 \ 0mnn: mnn (0 \ Xhh character with hexadecimal value 0x hh\ Uhhhh character with hexadecimal value 0x hhhh\ T tab ('\ u0009 ')\ N New Line (line feed) character ('\ u000a ')\ R carriage return ('\ u000d ')\ F form feed ('\ u000c ')\ A alarm (bell) character ('\
space characters, equivalent to [^ \ f \ n \ r \ v]\ D ----> matches any decimal digits, equivalent to [0-9]\ D ----> matches any non-digit characters, equivalent to [^ 0-9]
\ A ----> matches a bell (Alarm) \ u0007.\ B ----> matches a backspace \ u0008 if in a [] character class; otherwise, see the note following this table.\ T ----> matches a tab \ u0009.\ R ----> matches a carriage return \ u000d.\ V ----> matches a vertical tab \ u000b.\ F ---->
parsing of Java, \ is parsed into a regular expression \, and the second Parsing is parsed \, therefore, all escape characters not listed in "1.1", including "1.1" and "\" must be written twice)\ 0n CHARACTER n with an octal value of 0 (0 \ 0nn: NN (0 \ 0mnn: Mnn (0 \ Xhh character with hexadecimal value 0x HH\ Uhhhh character with hexadecimal value 0x hhhh\ T tab ('\ u0009 ')\ N New Line (line feed) character ('\ u000a ')\ R carriage return ('\ u000d ')\ F form feed ('\ u000c ')\ A alarm (Bell
content of a string to an array of the char type. Then modify some elements in the array. Then, useCharCreate a string instance in several groups
String Modification
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Class modifystrings{Static void main (){String STR = "The quick brown fox jumped over the fence ";System. Console. writeline (STR );Char [] chars = Str. tochararray ();Int animalindex = Str. indexof ("Fox ");If (animalindex! =-1){Char
Quick query of tables and Regular Expressions
Character
Copy codeThe Code is as follows:X characters x\ Backslash character\ 0n CHARACTER n with an octal value of 0 (0 \ 0nn: nn (0 \ 0mnn: mnn (0 \ Xhh character with hexadecimal value 0x hh\ Uhhhh character with hexadecimal value 0x hhhh\ T tab ('\ u0009 ')\ N New Line (line feed) character ('\ u000a ')\ R carriage return ('\ u000d ')\ F form feed ('\ u000c ')\ A alarm (bell) character ('\ u0007 ')\ E
common regular expressions (in fact, regexkitlite official online, afraid of cheating with shoes do not see)Characterdescription\amatch a BELL, \u0007\amatch at the beginning of the input. differs from ^ in that \a won't match after A New-line within the input.\b, outside of a [set]match if the current posi tion is a word boundary. Boundaries occur at the transitions between word \w and Non-word \w characters, with combining marks ignored. See also:r
X
Character x
\\
Backslash character
/ N
Characters with octal value 0 n (0 n 7)
/ nn
Character nn with octal value 0 (0 n 7)
/ Mnn
Characters with octal value 0 mnn(0 m 3, 0 N 7)
\x hh
Character hh with hexadecimal value of 0x
\u HHHH
Character with hexadecimal value of 0x hhhh
\ t
tab (' \u0009 ')
\ n
New lines (line break) ('
----------------------Asp.net+unity Development,. NET Training, and look forward to communicating with you. ----------------------The regular form of the expressionThe normal form: basic knowledge1 characters, 2 character class, 3 pre-defined character class, 4 Boundary match, 5 greedy number of words, 6 Logical operator Specific explanations:1 charactersXCharacter X\\ Backslash character\0nCharacters with octal value 0 N (0 \0nnCharacter nn with octal value 0 (0 \0mnnCharacters with octal val
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.