Simple regular expression for length

  • Thread starter Thread starter Magnus
  • Start date Start date
M

Magnus

Hi,

What regular expression should I use to allow any character (including space
etc) but only with a length of 6 to 8 characters?

Regards Magnus
 
Hello Magnus,
Hi,

What regular expression should I use to allow any character (including
space etc) but only with a length of 6 to 8 characters?

Regards Magnus

This question is so easily answered that I think you didn't try it yourself...

^.{6,8}$

Should do.
 
Well, I tried but...
I read the syntax but missed exactly the row about ".".
Thanks a lot
/Magnus
 
Back
Top