http://www.perlmonks.org?node_id=187362


in reply to Subscription Stuff

unless ( ( $display =~ /^[\w-]+$/ ) # Can contain chars, digits, _ +and - && ( $display !~ /^\d+$/ ) # But not just digits ) { # String failed to validate. }

If you're having trouble with the regexps presented, I suggest you give perlre a good long read -- they only get worse from here. :-)


_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche