Learn about greedy, reluctant, and possessive quantifiers for regular expressions.
- The Javadoc page for the pattern class…describes three categories of quantifiers:…greedy, reluctant, and possessive.…Each of these categories has syntax…for repeating regular expressions.…Zero or one, zero or more, one or more, exactly n,…at least n, at least n times but not more than m times.…First, I'll describe the categories of quantifiers…which are somewhat complicated.…Then I'll illustrate some of them using test classes.…
Greedy quantifiers consume the entire input string…prior to attempting the first match.…If the first match attempt, the entire input string fails,…the matcher backs off the input string…by one character and tries again.…Repeating the process until a match is found,…or there are no more characters left to back off.…The reluctant quantifiers take the opposite approach.…They start at the beginning of the input string…then reluctantly consume one character at a time,…looking for a match.…
The last thing they try is the entire input string.…Possessive quantifiers always consume…the entire input string…
- The IMQAV model
- Downloading software
- Installing and setting up a Java coding environment
- Mock tests
- Code coverage
- Using windows, views, and modes in IntelliJ IDEA
- Creating classes and attributes
- Creating constructors
- Casting variables
- Matching literals with regular expressions
- Regular expressions
- Design patterns
Skill Level Intermediate
Java: Database Integration with JDBCwith David Gassner2h 51m Intermediate
NumPy Data Science Essential Trainingwith Charles Kelly3h 54m Intermediate
1. Getting Started with Java
2. Test-Driven Development
3. IntelliJ IDEA
4. Object-Oriented Java
6. Regular Expressions (Regex)
8. Design Patterns
9. Applying Data Science
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.