Quantifiers in regular expressions

With quantifiers you match a string only if your number of characters is in it.

Example usage

.{8} // matches exactly eight characters of any type (as designated by the dot)
// "12345678" will match
// "abcdefgh" will match
// "1234567"  will not match
// "123456789"will not match
// -> it matches ONLY exactly 8 characters

Was this page helpful?

Thank you for telling