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

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

Regex 3
Are you a RegEx bandido? 2
RegEx Help 2
Replace email 1
Regex OnKeyDown question 1
Regex: replacing \n and spaces 4
Regex help 4
Regular Expressions 4

Back
Top