Regex Flashcards

1
Q

PCRE

A

Perl Compat. Regular Expression

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

[a-c]

A

Match a range from a to c

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

\w

A

Matches all letters, numbers, and underscore [A-Za-z0-9_]

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

a{3}

A

Match exactly three a’s

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

a{1,3}

A

Match exactly 1-3 a’s

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

[wxy]{5}

A

Five characters which can be w, x, or y

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

.{2,6}

A

2-6 of anything

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

*

A

0 or more of a character

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

+

A

1 or more of a character

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

[abc]+

A

1 or more a, b, or c

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

?

A

Preceding character is optional

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

Match “starts with”

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

$

A

Matches “ends with”

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

|

A

Or

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