Basic Regular Expressions Flashcards
1
Q
Bracket Expression ( [ ] )
A
Example: b[aeiou]g
can match bag, beg, big, bog, bug
2
Q
Range Expression ( - )
A
Example: a[2-4]z
can match a2z, a3z, a4z
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
4
Q
Caret ( ^ )
A
Shows the start of a line
5
Q
Dollar sign ( $ )
A
Shows the end of a line
6
Q
Repetition
A
Example: .*
7
Q
Backslash ( \ )
A
Used to escape a special character
Example: filename.txt