One-or-more quantifier
A one-or-more quantifier is a regular-expression quantifier that requires the preceding element or group to occur at least once, with additional occurrences permitted.
Tiny Python Projects: Learn coding and testing with puzzles and games
A one-or-more quantifier is a regular-expression quantifier requiring the preceding element or group to occur at least once.
- How it is used
- Uses + to recognize repeated consonants, digits, word characters, and separators while building practical regular-expression solutions.
- How deep it goes
- Defines the quantifier and demonstrates successful, failed, captured, and split matches without examining regex-engine internals.
- Examples
- Demonstrates consonants in chair, digits in abc123!, word characters, vowel-word groups, and punctuation in a sentence.
- What you can do after
- Apply it via Python's re module to require and capture one or more consecutive characters or groups.
The Quick Python Book, Fourth Edition
A one-or-more quantifier requires the preceding regular-expression element to occur at least once and permits additional occurrences.
- How it is used
- Uses `+` to require nonempty repeated portions when extracting names and matching structured text.
- How deep it goes
- Defines immediate-predecessor repetition and demonstrates character-class matching, but does not develop engine internals.
- Examples
- Demonstrates names, hyphenated names, overmatching strings, and Python `re` patterns for contact records.
- What you can do after
- Apply the quantifier in Python `re` patterns to match one or more characters or repeated subpatterns.
Read how The Quick Python Book, Fourth Edition explains one-or-more quantifier →
What to know first
- regular expressionA regular expression is a formal pattern notation for describing sets of strings and matching, searching, or transforming text according to those patterns.
Related concepts
- regular expressionpart of · A regular expression is a formal pattern notation for describing sets of strings and matching, searching, or transforming text according to those patterns.
- regex operatorkind of · A regex operator is syntax that modifies the matching behavior of a regular-expression term or group.
- plus operatorcontrasts with · The plus operator is a language-defined operation, commonly performing numeric addition, string concatenation, or collection combination according to operand types.
- quantifierkind of · A regular-expression quantifier is syntax that specifies how many times a preceding pattern element may or must match.
Questions about one-or-more quantifier
What is one-or-more quantifier?
A one-or-more quantifier is a regular-expression quantifier that requires the preceding element or group to occur at least once, with additional occurrences permitted.
Which Manning books explain one-or-more quantifier?
Tiny Python Projects: Learn coding and testing with puzzles and games and The Quick Python Book, Fourth Edition.
What should I know before learning one-or-more quantifier?
Manning books that teach one-or-more quantifier usually introduce regular expression first.
What is the difference between one-or-more quantifier and plus operator?
A one-or-more quantifier is a regular-expression quantifier that requires the preceding element or group to occur at least once, with additional occurrences permitted. The plus operator is a language-defined operation, commonly performing numeric addition, string concatenation, or collection combination according to operand types.
What is one-or-more quantifier a kind of?
One-or-more quantifier is a kind of regex operator. A regex operator is syntax that modifies the matching behavior of a regular-expression term or group.
What is one-or-more quantifier part of?
One-or-more quantifier is part of regular expression. A regular expression is a formal pattern notation for describing sets of strings and matching, searching, or transforming text according to those patterns.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

