| Greedy quantifier | Lazy quantifier | Description | 
|---|---|---|
| * | *? | Star Quantifier: 0 or more | 
| + | +? | Plus Quantifier: 1 or more | 
| ? | ?? | Optional Quantifier: 0 or 1 | 
| {n} | {n}? | Quantifier: exactly n | 
| {n,} | {n,}? | Quantifier: n or more | 
| {n,m} | {n,m}? | Quantifier: between n and m | 
          Last active
          November 18, 2020 08:53 
        
      - 
      
- 
        Save martinhj/4f4ceea4a139bdce11c4b28201cc14c1 to your computer and use it in GitHub Desktop. 
    Regex greed quantifiers
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | +-------------------+-----------------+------------------------------+ | |
| | Greedy quantifier | Lazy quantifier | Description | | |
| +-------------------+-----------------+------------------------------+ | |
| | * | *? | Star Quantifier: 0 or more | | |
| | + | +? | Plus Quantifier: 1 or more | | |
| | ? | ?? | Optional Quantifier: 0 or 1 | | |
| | {n} | {n}? | Quantifier: exactly n | | |
| | {n,} | {n,}? | Quantifier: n or more | | |
| | {n,m} | {n,m}? | Quantifier: between n and m | | |
| +-------------------+-----------------+------------------------------+ | |
| https://stackoverflow.com/questions/2301285#34806154 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment