A positive expression (regular expression) is an object that describes character patterns, a powerful tool that can be used for pattern matching and substitution, primarily for handling text operations, widely used, and many development languages support positive expressions, such as Java, C #, JavaScript, Perl, and so on.
This document is a guide to the use of positive expressions. Including: basic concepts, development specifications, Java processing methods, JavaScript processing, code examples and so on.
This document enables you to understand the basics of positive expressions, development specifications, common development practices, and the ability to work with a positive expression based on a Java, JavaScript language.
matching
characters
X
Character x
//
Backslash character
/0n
With octal value 0 character n (0 <= n <= 7)
/0nn
With octal value 0 of the character nn (0 <= n <= 7)
/0mnn
With octal value 0 Character Mnn (0 <= m <= 3, 0 <= n <= 7)
/xhh
with a hexadecimal value 0x character hh
/uhhhh
Character with hexadecimal value 0x hhhh
/t
Tab ('/u0009 ')
/n
New Line (newline) ('/ u000a ')
/R
Carriage return ('/u000d ')
/F
Page break ('/u000c ')
/a
Alarm (Bell) character ('/u0007 ')
/e The
Escape character ('/u001b ')
/cx
Corresponds to the control character for X
In positive expressions, many punctuation marks have special meanings. They are: ^ $. * + ? = ! : | / / () [] {}