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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Regular Expression Help 1
Regular Expression Help 2
Regular expressions 20
simple regular expression give runtime error @"[.-\s]" 3
Regex length 1
Regular Expression 2
Regular expression question 10
regular expression 7

Back
Top