Week 6 part 2 Flashcards

1
Q

JavaScript built in character ranges:

non-word boundary

A

\B

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

JavaScript built in character ranges:

word boundary

A

\b

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

JavaScript built in character ranges:

any digit; equivalent to [0-9]

A

\d

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

JavaScript built in character ranges:

any non-digit; equivalent to [^0-9]

A

\D

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

JavaScript built in character ranges:

any whitespace character; [\f\n\r\t\v]

A

\s

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

JavaScript built in character ranges:

any non-whitespace character

A

\S

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

JavaScript built in character ranges:

any word character; [A-Za-z0-9]

A

\w

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

JavaScript built in character ranges:

Any non-word character

A

\W

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

RegEx flags:

/pattern/g

A

global; match/replace all occurences

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

RegEx flags:

/pattern/i

A

case-insensitive

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

RegEx flags:

/pattern/m

A

multi-line mode

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

RegEd flags:

/pattern/y

A

“sticky” search, starts form a given index

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

T/F - Flags can be combined

A

True /abc/gi matches all occurences of abc AbC aBc

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

RegEx string match

string.match(regex) - What does this do?

A

If string fits pattern, it returns matching text, else null

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

RegEx string match

string.match(regex, “text”) - What does this do?

A

Replaces first occurence of pattern with the given text

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

Java Script Debugging tools shortcut

A

CTRL + ALT + L