Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Latest commit

 

History

History
44 lines (38 loc) · 1.89 KB

File metadata and controls

44 lines (38 loc) · 1.89 KB

Regular Expressions

Regular expressions, often shortened to "regex" or "regexp", are patterns that help programmers match, search, and replace text. Regular expressions are very powerful, but can be hard to read because they use special characters to make more complex, flexible matches.

In this course, you'll learn how to use special characters, capture groups, positive and negative lookaheads, and other techniques to match any text you want.

Exercises:

Using the Test Method
Match Literal Strings
Match a Literal String with Different Possibilities
Ignore Case While Matching
Extract Matches
Find More Than the First Match
Match Anything with Wildcard Period
Match Single Character with Multiple Possibilities
Match Letters of the Alphabet
Match Numbers and Letters of the Alphabet
Match Single Characters Not Specified
Match Characters that Occur One or More Times
Match Characters that Occur Zero or More Times
Find Characters with Lazy Matching
Find One or More Criminals in a Hunt
Match Beginning String Patterns
Match Ending String Patterns
Match All Letters and Numbers
Match Everything But Letters and Numbers
Match All Numbers
Match All Non-Numbers
Restrict Possible Usernames
Match Whitespace
Match Non-Whitespace Characters
Specify Upper and Lower Number of Matches
Specify Only the Lower Number of Matches
Specify Exact Number of Matches
Check for All or None
Positive and Negative Lookahead
Check For Mixed Grouping of Characters
Reuse Patterns Using Capture Groups
Use Capture Groups to Search and Replace
Remove Whitespace from Start and End