Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Re: tlug] Security question with grep/e...



On Tue, Mar 23, 2004 at 02:01:06PM -0500, Josh Glover wrote:
> Quoth Tim Hurman:
> 
> > 4) your security problems are simplified,
> >     die unless ($user_str =~ m/^[\w.]+$/);
> 
> Why the "." in the regular expression? Is that a typo? "." matches an awful
> lot, including quotes. Wouldn't a better regexp be: m/^[\w\s]+$/?
> 
> Or am I missing something here?

iirc, '.' inside [] is not treated as special. Even so PERL understands
[\.]

Tim.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links