Resolved. All works as spected. The problem was that the source string
wasn't the correct one, not the regex. Was a stupid mistake.

Thanks any way for the reply
Alfonso
On Dec 13, 12:10 am, [EMAIL PROTECTED] (Tom Phoenix) wrote:
> On 12/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to create a regex to ensure a minimum password length.
>
> It would seem that you should use the length function. (Also, why
> should it matter that the string in question is a password?)
>
> > I'm trying this:
>
> > $regex= '^.{4,}$'
>
> Maybe you need qr// ?
>
> > That work fine exept for, at least, the equal signal (=)
>
> > For example, if i try 'my=test", it returns false. If i try 'myte=st',
> > that works.
>
> > If i change 4 for 2 in regex, then the first example works (my=test)
>
> No, I don't think so. The pattern you're giving should match both. Can
> you show us the code that does what you're talking about?
>
>   print "matched\n" if 'my=test' =~ /^.{4,}$/;
>   print "matched\n" if 'myte=st' =~ /^.{4,}$/;
>
> Cheers!
>
> --Tom Phoenix
> Stonehenge Perl Training


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to