[TriLUG] OT - Reg Exp question.

Tim Jowers timjowers at gmail.com
Wed Nov 7 14:45:57 EST 2007


Um, is a capital O?

:-)
TimJowers


On Nov 7, 2007 2:34 PM, Andrew Perrin <clists at perrin.socsci.unc.edu> wrote:
> Works for me:
>
>
> aperrin at che:~$ perl -de1
>
> Loading DB routines from perl5db.pl version 1.28
> Editor support available.
>
> Enter h or `h h' for help, or `man perldebug' for more help.
>
> main::(-e:1):   1
>    DB<1> print 'good morning' if 0 =~ /^[0-9][-0-9,]*$/;
> good morning
>    DB<2>
>
>
> ----------------------------------------------------------------------
> Andrew J Perrin - andrew_perrin (at) unc.edu - http://perrin.socsci.unc.edu
> Associate Professor of Sociology; Book Review Editor, _Social Forces_
> University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA
>
>
>
>
> On Wed, 7 Nov 2007, Scott Lambdin wrote:
>
> > Hi -
> >
> > Can anyone tell me why /^[0-9][-0-9,]*$/  fails to match a lone 0?  It will
> > match a 3 or a 5, but not a zero.  I must have fallen asleep at some point
> > in Regular expressions class.
> >
> > --Scott
> > --
> > TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> > TriLUG Organizational FAQ  : http://trilug.org/faq/
> > TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> >
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>



More information about the TriLUG mailing list