Download presentation
Presentation is loading. Please wait.
Published byHenry Chambers Modified over 8 years ago
1
*
2
zero or more of the preceeding character. A* = blank (empty string), A, AA, AAA,…
3
+
4
1 or more of the preceeding character. B+ = B, BB, BBB, …
5
?
6
zero or one of the preceeding char. A? = blank, A
7
|
8
OR. A|B = A, B alternative = [ ]
9
(a+|b+)cc
10
acc, bcc, aacc, bbcc, GROUPING: gray | grey = gr(a|e)y; @([_a-zA-Z\d\- ]+(\.[_a-zA-A\d\-]+)+)
11
{a, b, c}
12
{ } the set of alphabet for a language
13
\
14
backslash = escape (the orginal meaning of the char follows it). \. = decimal point,. = any char
15
[ab]
16
a or b. [a-z] = a single char between a-z.
17
^ caret
18
NOT. ^t = the string cannot contain t
19
. Period or dot
20
any character (almost)
21
- class, inside [ ]
22
[a-z] matches all 26 letters. [a- zA-Z] matches all 52 letters. Hyphen
23
$ the dollar sign
25
\d
26
matches a single numeric character, [0-9];
27
\w
28
matches a single alphanumeric character = [a..z, A..Z, 0..9] [a- zA-Z0-9]
29
\W
30
matches a non-alphanumeric character = [^\w]
31
\D
32
matches a non-numeric character = [^\d]
33
\s
34
matches a single space character
35
\S
36
matches a single non-space character
37
[\.\d+]
38
=.123, or.365, etc
39
* and +
40
first, then concatenation, then | (or)
41
BNF
42
::=; ; | ; terminal symbol; alphabet
43
Syntax diagram
44
non-terminal symbols rect box; terminal symbols oval box.
45
RPN
46
Reversed Polish Notation, Postfix notation, simpler for machine to evaluate. No brackets.
47
(0|1)*
48
any order. * first then the |.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.