Meta Characters Flashcards

1
Q

Any Digit 0-9

A

\d

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

Any word Character
A-Z
a-z
0-9

A

\w

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

Any White Space

A

\s
Space
Tab

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

Matches any character

A

.

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

Non-white space

A

\S

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

Anything not a word character

A

\W

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

Quantifiers

A

meta characters that modify the previous character in the regex to say how many of those things you want to match in a row.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
Quantifiers
Match ("0" zero or more) of the preceding meta character
A

*

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
Quantifiers
Match (one or more) of the preceding meta character
A

+

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

Quantifiers

Match “0” zero or one of the preceding meta character

A

?

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

Quantifiers

Match “n” number of the preceding meta character

A

{n}

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

Quantifiers

{min,max}

A

Match “min,max” number of the preceding meta character

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

I want to find all 5 letter words in my text.

A

\w{5}

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

Positions

The beginning of a line

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

Positions

The end of a line

A

$

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

Positions

Word boundary

A

\b

17
Q

Match all words at the beginning of a line.

A

^\w+

18
Q

Match all words at the end of a line.

A

\w+$

19
Q

Match all words

A

\w+