C# में Quantifiers Specify करते हैं कि Previous Element (जो Character, Group, या Character Class हो सकता है) के कितने Instances Input String में Present होने चाहिए Match के लिए।
| Quantifier | Description | Pattern | Matches |
|---|---|---|---|
| * | Previous Element को Zero या More Times Match करता है। | \d*\.\d | ".0", "19.9", "219.9" |
| + | Previous Element को One या More Times Match करता है। | "be+" | "bee" in "been", "be" in "bent" |
| ? | Previous Element को Zero या One Time Match करता है। | "rai?n" | "ran", "rain" |
| { n } | Previous Element को Exactly n Times Match करता है। | ",\d{3}" | ",043" in "1,043.6", ",876", ",543", और ",210" in "9,876,543,210" |
| { n ,} | Previous Element को At Least n Times Match करता है। | "\d{2,}" | "166", "29", "1930" |
| { n , m } | Previous Element को At Least n Times, लेकिन No More Than m Times Match करता है। | "\d{3,5}" | "166", "17668" "19302" in "193024" |
| *? | Previous Element को Zero या More Times, लेकिन As Few Times As Possible Match करता है। | \d*?\.\d | ".0", "19.9", "219.9" |
| *? | Previous Element को Zero या More Times, लेकिन As Few Times As Possible Match करता है। | \d*?\.\d | ".0", "19.9", "219.9" |
| +? | Previous Element को One या More Times, लेकिन As Few Times As Possible Match करता है। | "be+?" | "be" in "been", "be" in "bent" |
| ?? | Previous Element को Zero या One Time, लेकिन As Few Times As Possible Match करता है। | "rai??n" | "ran", "rain" |
| { n }? | Preceding Element को Exactly n Times Match करता है। | ",\d{3}?" | ",043" in "1,043.6", ",876", ",543", और ",210" in "9,876,543,210" |
| { n ,}? | Previous Element को At Least n Times, लेकिन As Few Times As Possible Match करता है। | "\d{2,}?" | "166", "29", "1930" |
| { n , m }? | Previous Element को n और m Times के बीच, लेकिन As Few Times As Possible Match करता है। | "\d{3,5}?" | "166", "17668" "193", "024" in "193024" |