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 →
Related concepts
- regular expressionconfigures · A formal pattern notation that describes sets of strings and enables text to be matched, searched, extracted, or transformed.
- quantifierkind of · A regular-expression quantifier is syntax that specifies how many times a preceding pattern element may or must match.
- plus operatorcontrasts with · The plus operator is a language-defined operation, commonly performing numeric addition, string concatenation, or collection combination according to operand types.
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.

