Explore tens of thousands of sets crafted by our community.
Regular Expressions
17
Flashcards
0/17
^abc
Matches any string that starts with 'abc'.
abc
Matches any string that ends with 'abc'.
a.b
Matches any string containing 'a', any character, then 'b'.
a*b
Matches zero or more of 'a' followed by 'b'.
a+b
Matches one or more of 'a' followed by 'b'.
a?b
Matches zero or one of 'a' followed by 'b'.
a{3}
Matches exactly three consecutive 'a's.
a{3,}
Matches three or more consecutive 'a's.
a{2,4}
Matches between two and four consecutive 'a's.
(abc)
Matches the exact sequence 'abc' and captures it as a group.
[abc]
Matches any single character from the set: 'a', 'b', or 'c'.
[^abc]
Matches any single character that is not 'a', 'b', or 'c'.
a|b
Matches either 'a' or 'b'.
\d
Matches any digit, equivalent to [0-9].
\w
Matches any word character (alphanumeric plus underscore), equivalent to [A-Za-z0-9_].
\s
Matches any whitespace character (spaces, tabs, line breaks).
\b
Matches a word boundary (the position between a word character and a non-word character).
© Hypatia.Tech. 2024 All rights reserved.