Regular expressions pcre2 · Quantifiers, groups and alternation
Match as little as possible
Add ? after a quantifier to make it lazy. This matches the shortest text between the quotes.
".*?"
Official Regular expressions pcre2 documentation
More quantifiers, groups and alternation commands
- Repeat a pattern
- Match one of several options
- Capture parts of a match
- Group without capturing
- Name a capture group
- Match repeated text
All quantifiers, groups and alternation commands · Regular expressions pcre2 cheatsheet