in reply to validation of posted data.

Use a character class: /^[\w.]+$/
use strict; my @user = map { 'foo'.$_.'bar' } qw(! @ # $ % ^ & * ( ) _ .); for (@user) { print /^[\w.]+$/ ? "$_ is legal\n" : "$_ is illegal\n" ; }

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: (jeffa) Re: validation of posted data.
by Cine (Friar) on Jul 31, 2002 at 22:17 UTC
    I doubt \w is appropiate in this context, since usernames almost never may contain unicode chars or locale dependant chars ;)

    T I M T O W T D I