Basic Regular Expressions Flashcards

1
Q

Bracket Expression ( [ ] )

A

Example: b[aeiou]g

can match bag, beg, big, bog, bug

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

Range Expression ( - )

A

Example: a[2-4]z

can match a2z, a3z, a4z

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

Single Characters ( . )

A

Example: a.z

can match all words that starts with a and ends in z
that has one letter in between

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

Caret ( ^ )

A

Shows the start of a line

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

Dollar sign ( $ )

A

Shows the end of a line

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

Repetition

A

Example: .*

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

Backslash ( \ )

A

Used to escape a special character

Example: filename.txt

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