[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] reg ex til va lidering af password - kan det gøres kort ere?



Peter Makholm wrote:
Siemen Baader <sslug@sslug> writes:

Jeg kan lave testen ved at matche mod tre regulære udtryk i ruby:

pass =~ /^[A-Za-z0-9]{6}$/    #6 tegn og kun [A-Za-z0-9]
pass =~ /\d/                  #mindst et tal
pass =~ /\w/                  #mindst et bogstav

kan det reduceres til et eller evt to regulære udtryk? det er
begrænset hvad man kan lave af betingelser i reg ex, ikke?

Hvad vil du opnå?

hjælpe en ung ven der gerne vil se hvordan det kan gøres med regulære udtryk :)


- siemen



Jeg er overbevist om at ovenstående både er det der lettest at forstå for dig og det der er hurtigst at udføre for en computer.

//Peter



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2007-01-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *