Simple regular expression for length

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
 
J

Jesse Houwing

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.
 
M

Magnus

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 2
Regular Expression Help 1
Regex length 1
simple regular expression give runtime error @"[.-\s]" 3
Regular Expression 2
regular expression 7
Regular expression question 10
Regular expression 4

Top