Examples of Reluctant Quantifiers
A reluctant quantifier indicates the search engine to start with the shortest possible piece of the string. Once match found, the engine continue; otherwise it adds one character to the section of the string being checked and search that, and so on. This process follows until it finds a match or the entire string has been used up. Following are various examples of Reluctant Quantifiers using regular expression in java.
|Sr.No||Construct & Matches|
X, once or not at all.
X, zero or more times
X, one or more times.
X, exactly n times.
X, at least n times.
X, at least n but not more than m times