Regular expressions Flashcards
1
Q
[…] vs [^…]
A
[…] = any 1 char between brackets
[^…] = any 1 characyter NOT between brackets
2
Q
.
A
Any character except new line = [^\n]
3
Q
{ n,m}
A
match previous item at least n times but no more than m times
no max = { n,}
4
Q
?
A
zero or 1 occurence of the previous item = {0,1}
5
Q
+
A
matches 1 or more occurence of previous item
6
Q
*
A
Match sero of more occurrence of the previous item = {0,}
7
Q
- i
A
case insensitive
8
Q
-g
A
don’t stop after 1st matching
9
Q
|
A
match either right or left
10
Q
^ and $
A
^ = match beginning of string
$ = match end of the string