We don't bite newbies here... much | |
PerlMonks |
Re: Yet another REGEXP Questionby AidanLee (Chaplain) |
on Feb 05, 2002 at 16:48 UTC ( [id://143477]=note: print w/replies, xml ) | Need Help?? |
Of course merlyn has a very important point -- the more different characters you allow in your password field, the harder to guess the password. To answer your question, though, you'll need something like this:
It's a common saying that Perl gives you more than enough rope to hang yourself. Something similar can be said of the community too. We're not big on refusing to tell people some bit of knowledge. It's just that as we hand you that rope (and even telling you how to tie the knots), we're usually telling you why it isn't a good idea. Update: Thanks to merlyn for catching the security hole. I've left the code with the bug in place so his post continues to make sense. One thing I think is important to note about most of the replies that hasn't been explicitly mentioned is notice that almost all the code examples test for DesiredCharacters, not UndesiredCharacters. This is a best-practices approach to making sure you only get _exactly_ what you want in your password field, with no chances of forgetting to exclude anything undesired. That was my intention as well, but I seem to have let one (\n) slip in anyways.
In Section
Seekers of Perl Wisdom
|
|