Regexp Flashcards

1
Q

a or b

A

a|b

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Insert entire match

A

$&

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The character a

A

a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Null character

A

\0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

One non-whitespace

A

\S

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Tab

A

\t

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Hexadecimal character YY

A

\xYY

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Ignore case

A

i

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

End of string

A

$

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Insert Y’th captured group

A

$Y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Positive lookahead

A

(?=…)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

One whitespace

A

\s

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Word boundary

A

\b

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Start of string

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

One word character

A

\w

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

One character except: a, b, c, d

A

[^ab-d]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Non-capturing group

A

(?:…)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

One non-word character

A

\W

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Inserts $

20
Q

Non-word boundary

21
Q

Between 2 and 5

22
Q

Octal character YYY

23
Q

Escapes a special character

24
Q

Exactly 2

25
Insert following string
$'
26
Capturing group
(...)
27
Carriage return
\r
28
Negative lookahead
(?!...)
29
^ and $ match start and end of line
m
30
Insert preceding string
$`
31
Newline
\n
32
Match the Y'th captured group
\Y
33
0 or more a's
a*
34
Backspace character
[\b]
35
0 or more
*
36
One character of: a, b, c, d
[ab-d]
37
2 or more
{2,}
38
Any character except newline
.
39
One non-digit
\D
40
One digit
\d
41
Hexadecimal character YYYY
\uYYYY
42
The string ab
ab
43
1 or more
+
44
0 or 1
?
45
Control character Y
\cY
46
Global Match
g