----- Original Message -----
From: "John W. Krahn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 5:55 PM
Subject: Re: $searchstring help


> Shawn wrote:
> >
> > > On Fri, Dec 07, 2001 at 04:35:11PM -0500, Maurice Reeves wrote:
> > > > not quite.  \w matches _ also, and he didn't have
> > > > that in his list.
> > > >
> > > > how about
> > > > $searchstring =~ /^[a-z0-9]+/i;
> > >
> > > I'm not sure why you're both anchoring the pattern.  He didn't specify
it
> > > had to start with a letter or number, he said it needs to be in the
> > string.
> > >
> > >     $searchstring =~ /[a-z0-9]/i;
> >
> > Why slow it down with the 'i'?
> >   $searchstring=~/[a-zA-Z0-9]/;
>
>
> Why slow it down with a regular expression?  :-)
>
> if ( $searchstring =~ tr/a-zA-Z0-9/ ) {

I don't use tr often since most of my regex's are match, not subs.  Does
this not actually do the transpose?

Shawn


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to