3

How do you indicate a regex that you want to require more than 10 characters? I know that '*' is more than 0, and that '+' is more than 1 but what is syntax for requiring more than 10? Thanks all!!!!

1
  • If you want to practice your regex or even just see what a regex is doing, this is a great site. It will break the expression down and tell you exactly what it's expecting. regex101.com Commented Feb 18, 2013 at 3:28

2 Answers 2

16

You use brace notation. For instance, the regex a{10,} would match 10 or more a characters. a{10,20} would match at least 10 and no more than 20 as.

Sign up to request clarification or add additional context in comments.

Comments

9

It depends on what your regex looks like, but this probably will work:

[^stuff]{10,} 
  • {10,} matches at least 10.
  • {,10} matches at most 10.
  • {10,15} matches between 10 and 15.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.