Regex wiseguy or girl

  • Thread starter Thread starter Arjen
  • Start date Start date
A

Arjen

Hi,

I need a regex for my password. I tried this [a-zA-Z0-9_]{6,25} but this is
not exactly what I need.

The password total length must be between 6 and 25 characters.
Character that are allowed are a...z (lower and uppercase), numbers (0..9)
and these !@#$%^&*(){}<>?.
The space character is not allowed.

I hope someone can help me.

Thank you!
 
Hello Arjen,
Hi,

I need a regex for my password. I tried this [a-zA-Z0-9_]{6,25} but
this is not exactly what I need.

The password total length must be between 6 and 25 characters.
Character that are allowed are a...z (lower and uppercase), numbers
(0..9)
and these !@#$%^&*(){}<>?.
The space character is not allowed.
I hope someone can help me.

Thank you!

Quite easy...

^[a-zA-Z0-9!@#$%^&*(){}<>?\.]{6,25}$

One question though... why limit your users creativity. The harder to guess
the better I'd say...
 
One question though... why limit your users creativity. The harder to
guess the better I'd say...

Exactly. Pass phrases rock, and they're pretty darn hard to implement
without spaces....
 
Back
Top