ADV PROG REGEX Flashcards

1
Q

is used to turn off (escape) the special meaning of a meta-character or to confer special meaning to other characters.

A

Backslash ( ), known as the escape character

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

is a list of values placed inside square braces to match a single character in data.

A

character class([ ] )

caret ( ^) negates the list inside the brackets

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

[0-9]

Any digit character

A

\d

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

[^0-9]

Any non-digit character

A

\D

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

[A-Za-z0-9_]

Any word character

A

\w

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

[^A-Za-z0-9_]

Any non-word character

A

\W

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

[\t\r\n\f ]

Any whitespace character

A

\s

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

[^\t\r\n\f ]

Any non-whitespace character

A

\S

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

is either a single character or a group of related characters.

A

token

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

used to indicate how many times the previous token should be repeated.

A

quantifier({ } )

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

{0,}

Zero or more of the previous token

A

*

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

{1,}

One or more of the previous token

A

+

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

{0,1}

Zero or one of the previous token

A

?

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

used to match the start of a string, except when part of a character class.

A

caret ( ^ )

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

used to match the end of a string.

A

dollar sign ( $ )

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

used to match a zero-length position before or after a word character, effectively matching whole words only anywhere in a line of text.

A

boundary anchor ( \b )

17
Q

used to match any single character, except .

A

dot (. )

18
Q

used to make a group of tokens that can be quantified as a unit or to create a list of string values from which to choose.

A

back references(\1 … \9)

19
Q

used in a group to create a selection of strings from which to choose, thereby matching either token on the left or right side.

A

pipe ( | )